【发布时间】:2020-12-08 23:04:27
【问题描述】:
我的大部分代码都在一个 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;
}
【问题讨论】:
-
请在此处发布您的 HTML 和 CSS,而不是链接到您的网站,以供现在和将来参考。
-
我在这里链接了网站,因为我无法将问题隔离到几行。我觉得复杂性需要更多的 HTML/CSS/JS 部分
-
将
z-index设置为 999 之类的东西 -
已解决...看看我下面的答案。