html
<div class="content">
<div class="bg"></div>
</div>
css
.content {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
bottom: 0;
right: 0;
.bg {
position: relative;
width: 100%;
height: 100%;
background-image: url("../images/identity-intro/identity.jpg");
background-repeat: no-repeat;
background-size:100% 100%;
background-position: center center;
}
}
利用position的固定,定位完美解决