我想将整个标题图层“header-container”如下所示置于所有内容之上,滚动时,“container-site”内的任何内容都应出现在标题后面。
以下是我的代码。
全宽div
.header-container {
position: fixed;
width: 100%;
z-index: 10000;
}
固定宽度div到居中对齐标题和一些样式
.header-wrapper {
margin-bottom: -1px;
border-radius: 0;
border-bottom: 1px solid #cc6666;
height: 263px;
position: relative;
display: block;
width: 1140px;
margin: 0px auto;
}
然后是页面正文
.container-site {
margin: 0px auto;
width: 1140px;
padding-top: 280px;
}
目前只有标题(h1,h2,h3)出现在标题后面。我正在使用Bootstrap。