【发布时间】:2015-05-17 00:30:36
【问题描述】:
在http://www.jeroenvanderwaal.com 的主页上,我试图让背景图像覆盖整个屏幕。我无法找出为什么它没有覆盖但在底部留下一个空白空间。到目前为止的代码:
.page-id-4 #main {
background-image: url(http://www.jeroenvanderwaal.com/wp-content/uploads/2015/03/achtergrond2.jpg);
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center center;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
padding-top: 60px;
padding-bottom: 0px;
}
我只想要此页面的背景,因此需要 .page-id-4 。有没有办法让它覆盖整个屏幕?
【问题讨论】:
标签: css background screen cover