1

我为整个页面制作了背景图片。其他浏览器没问题,但在 Firefox 中,背景图像没有显示,而是整个背景都是黑色的。这是我的CSS:

html { 
    background: url(../images/bglogin.jpg) no-repeat center center fixed; 
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;

    filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/bglogin.jpg', sizingMethod='scale');
-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=../'images/bglogin.jpg', sizingMethod='scale')";
}
4

1 回答 1

0

用这个

html { 
     background-image:url('images/bglogin.jpg');
     background-repeat:no-repeat;
     background-attachment:fixed;
     background-position:center; 
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;

    filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/bglogin.jpg', sizingMethod='scale');
-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=../'images/bglogin.jpg', sizingMethod='scale')";
}
于 2013-01-23T07:18:09.463 回答