我的大部分代码都在jsFiddle中:
http://jsfiddle.net/MilkyTech/suxWt/
内容应该加载在第一页的白色框中,溢出内容应将页面中下面的部分向下推。然而,可以看到底部的部分会覆盖在第一页的白色框上方。我已经尝试更改各个部分的定位/清除设置,但似乎无法创建必要的移动。
<section class="page1">
<div class="huge-title centered">
<div id='detailsbox'>
<h1 id='eorvtitle'></h1>
<img id='eorvimage' src=''>
<div><p>lots of text lots of text
</div>
</div>
</section>
<section class="page2" id='page2'>
</section>
.page1 {
background: url('../img/bg.jpg')#131313;
background-size: cover;
height: 100%;
position: relative;
}
.huge-title {
position: absolute;
top: -20%;
right: 0;
bottom: 0;
left: 0;
margin: auto;
width: 100%;
height: 180px;
}
#detailsbox {
top: -4em;
width: 75%;
left: 12.5%;
right: 12.5%;
border: 20px solid white;
border-radius: 10px;
background-color: white;
text-align:center;
position: absolute;
float: left;
clear: both;
}
z-index
设置为类似于999的值。 - Victor