.style1 {
background: url(images/bg.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
工作地点:
> Safari 3
> Chrome无论如何
> IE 9
> Opera 10(Opera 9.5支持background-size但不是关键字)
> Firefox 3.6(Firefox 4支持非厂商前缀版本)
此外,你可以尝试这个为解决方案
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='.myBackground.jpg', sizingMethod='scale');
-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='myBackground.jpg', sizingMethod='scale')";
zoom:1;