所以我只用我已經定位他們對我的頁眉和頁腳CSS創建了一個下拉菜單,我的問題是如何才能讓我上面的按鈕,我的菜單顯示,而不是在它下面(僅限頁腳按鈕)。有任何想法嗎?「刪除備份」菜單我的代碼
CSS
.d_button {
color: #FFFFFF;
background-color: #222222;
border: none;
cursor: pointer;
font-size: 80%;
font-weight: bolder;
line-height: 50%;
padding: 8px;
}
.drop_top {
position: inherit;
display: inline-block;
background-color: #222222;
float: right;
}
.drop_bot {
position: inherit;
display: inline-block;
background-color: #222222;
float: left;
}
.drop_content {
display: none;
position: absolute;
right: 14px;
background-color: #222222;
min-width: 80px;
}
.drop_content a {
color: #FFFFFF;
padding: 5px;
text-decoration: none;
display: block;
}
.drop_content a:hover {
color: #03A9F4;
}
.drop_top:hover .drop_content {
display: block;
}
.drop_bot:hover .drop_content {
display: block;
}
<div id="header_container">
<div id="header">
Header Content
<div class="drop_top">
<button class="d_button">
<div id="nav_icon" class="top">☰</div>
</button>
<div class="drop_content">
<a href="#">A</a>
<a href="#">B</a>
<a href="#">C</a>
</div>
</div>
</div>
</div>
<div id="container">
<div id="content">
</div>
</div>
<div id="footer_container">
<div id="footer">
Footer Content
<div class="drop_bot">
<button class="d_button">
<div id="nav_icon" class="bottom">☰</div>
</button>
<div class="drop_content">
<a href="#">A</a>
<a href="#">B</a>
<a href="#">C</a>
</div>
</div>
</div>
</div>
感謝