<style type="text/css">
#pointermenu{
border-top: 7px solid black; /*optional border across top*/
margin: 0;
padding: 0;
}
#pointermenu ul{
margin: 0;
margin-left: 15px; /*菜单距离窗口左边的距离*/
float: left;
padding-left: 8px;
font: bold 13px Verdana;
background-color: black;
background: black url(media/leftround.gif) bottom left no-repeat; /*可选的左圆角*/
}
* html #pointermenu ul{ /*针对IE6. 减少 ul 的左边距并增加 1em 的下边距*/
margin-bottom: 1em;
margin-left: 7px; /*IE中菜单距离窗口的左边距*/
}
#pointermenu ul li{
display: inline;
}
#pointermenu ul li a{
float: left;
color: white;
font-weight: bold;
padding: 2px 11px 7px 7px;
text-decoration: none;
background: url(media/pointer.gif) bottom center no-repeat;
}
#pointermenu ul li a:visited{
color: white;
}
#pointermenu ul li a:hover, #pointermenu ul li a#selected{ /*选中和hover的效果样式*/
color: white;
background-color: darkred;
}
#pointermenu ul li a#rightcorner{
padding-right: 0;
padding-left: 2px;
background: url(media/rightround.gif) bottom right no-repeat; /*可选的右圆角*/
}
</style>
<div id="pointermenu">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">DHTML</a></li>
<li><a href="#" id="selected">CSS</a></li>
<li><a href="#">Forums</a></li>
<li><a href="#">Gif Optimizer</a></li>
<li><a href="#">Button Maker</a></li>
<li><a href="#">Contact</a></li>
<li><a href="#" id="rightcorner"> </a></li>
</ul>
</div>
<br style="clear: left" />
平滑圆角水平菜单
最新推荐文章于 2024-08-20 19:23:57 发布