这是我想要完成的:
_____________________________________________________________________________
| option option option option |
|_____________________________________________________________________________|
| image | | image | | image | | image |
|_________| |_________| |_________| |_________|
在只有选项而不是按钮的菜单栏中。此外,图像仅显示下半部分。我试过这个:
HTML
<div class="m_img"> <img src="image1.png" width="60px" height="30px"> </div>
<div class="m_img"> <img src="image2.png" width="60px" height="30px"> </div>
<div class="m_img"> <img src="image3.png" width="60px" height="30px"> </div>
<div class="m_img"> <img src="image4.png" width="60px" height="30px"> </div>
<div id="menu_bar" class="centered">
<a class="m_button" href="javascript:change(0)"> text0 </a>
<a class="m_button" href="javascript:change(1)"> text1 </a>
<a class="m_button" href="javascript:change(2)"> text2 </a>
<a class="m_button" href="javascript:change(3)"> text3 </a>
</div>
CSS
.m_img {
float: left;
width: 250px;
z-index: 1;
}
.m_button {
float: left;
width: 250px;
font-size: 110%;
z-index: 2;
}
但是菜单栏会下降并且不会与图像重叠。知道如何设置吗?