html - 页面似乎卡在特定高度,我无法创建更多底部空间

标签 html css frontend

我试图克隆一些网站来提高我的技能,但我遇到了一个问题,页面似乎卡在了一个特定的高度,当我尝试添加更多 html 时它就消失了(它没有消失,它是添加在页面顶部背景图像后面)。我真的很想知道是什么原因造成的,以及如何在不弄乱背景图像的情况下解决它。

.center{
  text-align: center;
}
*{
  margin 0;
  padding: 0;
}
a:link {
    color: inherit;
}

a:visited {
  color:inherit;
}

a:hover {
    color: #ea7640;
}

a:active {
    color:inherit;
}
a {
  text-decoration: none;
}
#wrapper {
    background-image: url("https://66.media.tumblr.com/f79df0dd538fc53292fe1aac7cd54daf/tumblr_oga789rskz1vxey6qo1_1280.png");
  position: fixed; 
  top: 0; 
  left: 0; 
  min-width: 100%;
  min-height: 70%;
  background-repeat: no-repeat;
  background-size: cover;
  margin-top: 3em;

}

nav {
  background-color: #312822;
  padding: 3px;
  margin-top: -8px;
  margin-left: -8px;
  margin-right:-8px;
  font-size: 13px;
}
li {
  list-style-type: none;
  display: inline-block;
  margin-right: 25px;
  color: #bdb9b7;
}
#proyecto {
  color: #ea7640;
}
.texto {
  color: #ea7640;
  font-weight: bold;
}

#logo {
  margin-top: 4em;
}

#text{
  margin-top: 4em;
  font-weight: bold;
}
#marca {
  margin-top: 10em;
  font-style: italic;
}

#wrapper2{
  position: fixed;
  min-width: 100%;
  min-height: 1000px;
  background-color: #fff;
  margin-top: 700px;
  left: 0;
}
#wrapper2 ul {
  margin-top: 20px;
}

演示:http://codepen.io/njwda/pen/PbwaOV

最佳答案

只需从包装元素中删除 position: fixed - 这样元素就会简单地显示在彼此下方,就像它们应该的那样。

关于html - 页面似乎卡在特定高度,我无法创建更多底部空间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40557226/

相关文章:

html - 如何在左上角或右上角旋转和定位元素?

jquery - 在 jQuery 中从下到上而不是从上到下动画 div

html - 使用 :before 缩进 Div 中的换行符

html - body 伪元素 100% Document 高度

html - Flexbox 不适用于 IE10

javascript - 如何从数组中删除空数组值 ("")?

ios - iframe 阻止 iScroll 在移动 Safari 上滚动

html - 使用 CSS 移动图像/链接

java - 每次更改窗口大小时,标签位置都会发生变化

javascript - 如何在 react 中将类名添加到变量内的元素?