html,
body {
height: 100%;
}
.page {
position: absolute;
width: 100%;
height: 100%;
}
#page>.bg {
position: absolute;
z-index: -1;
width: 100%;
height: 100%;
}
#page1>.bg {
background: url("../images/p1_bg.jpg") no-repeat center center;
background-size: 100%;
}
#page2>.bg {
background: url("../images/p2_bg.jpg")no-repeat center center;
background-size: 100%;
}
#page3>.bg {
background: url("../images/p3_bg.jpg")no-repeat center center;
background-size: 100%;
}
可以发实现效果截图,具体分析一个,执行index.html页面,快捷键f12可以调试