css下拉菜单
#header {
position: relative;
width: 100%;
font: 12px normal Arial, Helvetica, sans-serif;
z-index:1;
}
#header .disclaimer a {
color: #ccc;
}
#header img {
/*margin: 20px 0 10px;*/
}
ul.topnav {
list-style: none;
padding: 0 20px 0 20px;
margin: 0px;
float: left;
width:96%;
font-size: 1.2em;
background: url(/resources/images/topnav_bg.gif) repeat-x;
}
ul.topnav li {
float: left;
margin: 0;
padding: 0 15px 0 0;
position: relative; /*--Declare X and Y axis base--*/
}
ul.topnav li a {
padding: 10px 5px;
color: #fff;
display: block;
text-decoration: none;
float: left;
}
ul.topnav li a:hover {
/*background: url(topnav_hover.gif) no-repeat center top;*/
}
ul.topnav li span {
width: 17px;
height: 35px;
float: left;
background: url(/resources/images/subnav_btn.gif) no-repeat center top;
}
ul.topnav li span.subhover {
background-position: center bottom;
cursor: pointer;
}
/*--Hover effect for trigger--*/
ul.topnav li ul.subnav {
list-style: none;
position: absolute; /*--Important - Keeps subnav from affecting main navigation flow--*/
left: 0;
top: 35px;
background: #336699;
margin-top: -4px;
padding: 0;
display: none;
float: left;
width: 170px;
border-left: 1px solid #4682b4; /*--Create bevel effect--*/
border-right: 1px solid #4682b4; /*--Create bevel effect--*/
-moz-border-radius-bottomleft: 5px;
-moz-border-radius-bottomright: 5px;
-webkit-border-bottom-left-radius: 5px;
-webkit-border-bottom-right-radius: 5px;
}
ul.topnav li ul.subnav li {
margin: 0;
padding: 0;
border-bottom: 1px solid #4682b4; /*--Create bevel effect--*/
clear: both;
width: 170px;
}
html ul.topnav li ul.subnav li a {
float: left;
width: 145px;
background: #6490bb no-repeat 10px center;
padding-left: 20px;
}
html ul.topnav li ul.subnav li a:hover {
/*--Hover effect for subnav links--*/
background: #C9C9A7 no-repeat 10px center;
color: black;
}
<div id="header">
<ul class="topnav">
<li><a href="javascript:">人员管理</a>
<ul class="subnav">
<li><a href="./ChangePassword.do">修改密码</a></li>
<li><a href="./UserLoginLogList.do">操作日志</a></li>
</ul>
</li>
<li><a href="javascript:">服务管理</a>
<ul class="subnav">
<li><a href="./ServiceRegisterList.do">服务注册</a></li>
<li><a href="./ServiceLogList.do">服务日志</a></li>
<li><a href="./ListServiceStatus.do">服务监控</a></li>
</ul>
&