我试图克隆一些网站来提高我的技能,但我遇到了一个问题,页面似乎卡在了一个特定的高度,当我尝试添加更多 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;
}
最佳答案
只需从包装元素中删除 position: fixed
- 这样元素就会简单地显示在彼此下方,就像它们应该的那样。
关于html - 页面似乎卡在特定高度,我无法创建更多底部空间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40557226/