CSS3 background-size 如果只定义1个值,则第2个值默认为auto

浏览器参照基准:Firefox3.6 and Later, Chrome5 and Later, Safari5 and Later, Opera11.50 and Later, IE9.0 and Later

所用图片:

CSS3 background-size demo

示例:

#background-size-value{
	background-size:200px;        /* 这里等同于'200px auto' */
}

* background-size 如果只定义1个值,则第2个值默认为auto(特定值cover和contain除外)。

CSS探索之旅