嘿,我想你应该想要下拉菜单
我创建了一些示例检查它
HTML
<ul class="navi">
<li><a href="#">Home</a></li>
<li><a href="#">Home2</a></li>
<li><a href="#">Home3</a>
<ul class="submenu">
<li><a href="#">Home</a></li>
<li><a href="#">Home2</a></li>
<li><a href="#">Home3</a></li>
<li><a href="#">Home4</a></li>
<li><a href="#">Home5</a></li>
</ul>
</li>
<li><a href="#">Home4</a></li>
<li><a href="#">Home5</a></li>
</ul>
CSS
ul, ul li{
margin:0;
padding:0;
}
.navi, .submenu{
list-style:none;
display:block;
margin:0;
padding:0;
}
.navi > li{
background:green;
display:inline-block;
vertical-align:top;
position:relative;
}
.navi li a{
color:white;
padding:10px;
display:block;
text-decoration:none;
}
.navi li .submenu{
display:none;
position:absolute;
top:39px;
left:0;
}
.navi li:hover .submenu{
display:block;
}
.submenu > li{
display:block;
background:red;
}
.submenu li > a{
border-top:2px solid black;
display:block;
}
现场演示http://tinkerbin.com/GoDsKf4n