```css
.background-pic{
background: url(../images/login/background.jpg) no-repeat center center;
background-size:cover;
background-attachment: fixed;
width: 100%;
height: 100%;
position: fixed;
top:0;
left:0;
right:0;
bottom:0;
}
```
<div class="background-pic"></div>
background-size:cover; //把背景图像扩展至足够大,以使背景图像完全覆盖背景区域。背景图像的某些部分也许无法显示在背景定位区域中。
background-attachment: fixed; //fixed: 随着页面的滚动轴背景图片不会移动