这是我网站的主页。 http://puu.sh/d9HeI/dd63792292.png 但是当我向下滚动时,内容框会越过标题而不是下面。 http://puu.sh/d9HiQ/ba031bf256.png
这是我的代码:
HTML
<div class="Content-Box"> (First Box)
</div>
CSS
.Content-Box {
position: relative;
margin: 0 auto;
background-color: white;
top: 65px;
padding: 45px;
height: -70px;
text-align: center;
box-shadow: 0px 3px 3px #888888;
}
最佳答案
添加 z-index
会将 header 置于每个 元素
之上
将 z-index:100
添加到 header
关于html - 当滚动我网站的一部分时,它会越过我的标题而不是下面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27199069/