DIV 高度 100% 不适用于大型内容
DIV height 100% not working on large content
我正在努力让我的背景充满 100%。目前它出现在每个页面上,除了内容太大的地方(见照片 (http://i58.tinypic.com/2n18hn8.png))。我尝试了很多不同的方法来修复它,但没有任何效果。如果我将#page-wrapper 更改为 3000px,它将完全显示背景,但在其他页面上太大了。请帮忙
html,
body,
#page {
height: 100%;
}
#page-wrapper {
min-height: 100%;
min-width: 960px;
}
在你的bodyclass
body{
background-size:cover;
background-image: url('img/cover.png');
background-position: top center;
background-attachment: fixed;
background-repeat: no-repeat;
background-color: #000;
overflow: hidden;
}
试试这个,让我知道你的想法。
我正在努力让我的背景充满 100%。目前它出现在每个页面上,除了内容太大的地方(见照片 (http://i58.tinypic.com/2n18hn8.png))。我尝试了很多不同的方法来修复它,但没有任何效果。如果我将#page-wrapper 更改为 3000px,它将完全显示背景,但在其他页面上太大了。请帮忙
html,
body,
#page {
height: 100%;
}
#page-wrapper {
min-height: 100%;
min-width: 960px;
}
在你的bodyclass
body{
background-size:cover;
background-image: url('img/cover.png');
background-position: top center;
background-attachment: fixed;
background-repeat: no-repeat;
background-color: #000;
overflow: hidden;
}
试试这个,让我知道你的想法。