CSS控制的横向列表菜单

<style type="text/css">
.test ul{list-style:none;} 
.test li{float:left;width:100px;background:#CCC;margin-left:3px;line-height:30px;} 
.test a{display:block;text-align:center;height:30px;} 
.test a:link{color:#666;background:url(arrow_off.gif) #CCC no-repeat 5px 12px;text-decoration:none;} 
.test a:visited{color:#666;text-decoration:underline;} 
.test a:hover{color:#FFF; font-weight:bold;text-decoration:none;background:url(arrow_on.gif) #F00 no-repeat 5px 12px;}  
</style>
 
<div class="test"> 
<ul> 
<li><a href="1">首页</a></li> 
<li><a href="2">产品介绍</a></li> 
<li><a href="3">服务介绍</a></li> 
<li><a href="4">技术支持</a></li> 
<li><a href="5">立刻购买</a></li> 
<li><a href="6">联系我们</a></li> 
</ul> 
</div>

猜你喜欢

转载自blog.csdn.net/qq_37434563/article/details/78136347