我在我的主要內容窗口頂部顯示一個小小的問題。z-index仍然覆蓋
嘗試移動頁邊距,使主頁內容超過100px,頁腳重疊100px並呈現到窗口底部。
如果有,還有其他方法可以做到這一點嗎?
感謝
#wrapper:before {
content: '';
float: left;
height: 100%;
}
#wrapper {
height: 100%;
background-color: black;
}
#header {
z-index: 1;
height: 250px;
text-align: center;
background: url(../images/bg02.jpg);
border-bottom: 10px solid #01A9DC;
}
#main {
z-index: 2;
margin: -100px auto -50px auto;
width: 80%;
background-color: white;
min-height: 400px;
}
#footer {
z-index: 1;
border-top: 10px solid #01A9DC;
background: url(../images/bg02.jpg);
}
#footer:after {
z-index: 1;
content: '';
display: block;
clear: both;
}
<div id="wrapper">
<div id="header"> HEADER<br> </div>
<div id="main"> MAIN CONTENT </div>
<div id="footer"></div>
</div>