background: url('../imgs/loginbg.jpg') no-repeat center center fixed;-webkit-background-size: cover;-moz-background-size: cover;-o-background-size: cover;background-size: cover;
1. background: url('../imgs/loginbg.jpg');2. background-repeat:no-repeat; // 图片不重复3. background-position: center center; // 第一个值:水平位置 第二个值: 垂直位置(x轴y轴都居中对齐)【等同于 background-position: center; 】4. background-attachment: fixed; // 当页面的其余部分滚动时,背景图像不会移动。