css 设置背景图片铺满固定不动
#page{
position: relative;
width: 100%;
height: 100%;
background-image:url(../img/bg.JPG);
background-attachment: fixed;
background-repeat: no-repeat;
background-size: cover;
float: left;
}
![](https://images.cnblogs.com/cnblogs_com/xiaobo-Linux/736394/o_erweima.png)
#page{
position: relative;
width: 100%;
height: 100%;
background-image:url(../img/bg.JPG);
background-attachment: fixed;
background-repeat: no-repeat;
background-size: cover;
float: left;
}