Firefox显示背景图像黑色

时间:2013-01-23 07:05:58

标签: html css

我为整页制作了背景图片。它与其他浏览器一样好但在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')";
}

1 个答案:

答案 0 :(得分: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')";
}