众所周知,CSS背景图片平铺有个最直接的办法就是利用backgroud-size:cover,但是在body的height未达到100%的情况下底部是会留白的,此时有个解决方法:
<img sc='xxxx' class='back-img'/>
.back-img{
z-index:-1;
position:fixed;
width:100%;
height:100%;
left:0;
top:0;
}
众所周知,CSS背景图片平铺有个最直接的办法就是利用backgroud-size:cover,但是在body的height未达到100%的情况下底部是会留白的,此时有个解决方法:
<img sc='xxxx' class='back-img'/>
.back-img{
z-index:-1;
position:fixed;
width:100%;
height:100%;
left:0;
top:0;
}