body {

/* 加载背景图 */
background: url("../static/images/index/backImg.jpg") no-repeat;

/* 背景图垂直、水平均居中 */
background-position: center center;

/* 当内容高度大于图片高度时,背景图像的位置相对于viewport固定 */
background-attachment: fixed;

/* 让背景图基于容器大小伸缩 */
background-size: cover;

/* 设置背景颜色,背景图加载过程中会显示背景色 */

   background-color: rgba(41, 50, 39, 1);

}

将table-cell的display设置为inline-block 就可以给该元素设置margin
posted on 2017-05-11 14:59  Tiffany_my  阅读(7519)  评论(0编辑  收藏  举报