html - 当滚动我网站的一部分时,它会越过我的标题而不是下面

标签 html css

这是我网站的主页。 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/

相关文章:

html 电子邮件 outlook 2003 问题

javascript - 通过服务器消息单击按钮

javascript - Drupal 7 背景图像无需滚动即可修复

css 不适用于 Web 内容中的内部文件夹 jsp

html - 外部 div 高度不随着内部 img 扩展

html - 如何使用百分比而不是像素将背景图像设置为伪元素?

html - CSS相邻 sibling 互相覆盖

java - Jsoup 选择命令

css - 向左和向右剪辑图像

javascript - 如何将带有按钮的图像上传到 Canvas 中