CSS3 background-size:cover

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

所用图片:

CSS3 background-size demo

示例:

#background-size-cover{
	background-size:cover;
}

* background-size的cover特定值会保持图像本身的宽高比例,将图片缩放到正好完全覆盖定义背景的区域。

CSS探索之旅