<DIV>
<UL id="nav">
<LI><A href="index.asp"><FONT
color=#ffffff>网站首页</FONT></A>
<LI><A href="about.asp"
rel=dropmenu1><FONT color=#ffffff>走进昌禾</FONT></A>
<ul>
<li><a href="about.asp">昌禾简介</a></li>
<li><a href="about.asp">企业文化</a></li>
</ul>
</li>
<LI><A href="zs.asp"
rel=dropmenu6><FONT color=#ffffff>招聘招商</FONT></A>
<ul>
<li><a href="zp.asp">招聘信息</a></li>
<li><a href="zs.asp">招商代理</a></li>
</ul>
</li>
<LI><A href="lxwm.asp"
rel=dropmenu7><FONT color=#ffffff>联系我们</FONT></A> </li>
</UL></DIV>
<style>
#nav {
list-style-type: none;
font-weight:bold;
font-size:24px;
}
#nav a {
display: block; width: 100px; text-align:center;
}
#nav a:link {
text-decoration:none;
}
#nav a:visited {
text-decoration:none;
}
#nav a:hover {
text-decoration:none;font-weight:bold;
}
#nav li {
float: left; width: 100px;
}
#nav li a:hover{
}
#nav li ul {
list-style-type: none;text-align:left;
left: -999em; width: 101px; position: absolute; margin-left:0px;
}
#nav li ul li{
float: left; width: 101px;
background: #F6F6F6;
}
#nav li ul a{
display: block; width: 101px;text-align:left;padding-left:10px;
}
#nav li ul a:hover {
color:#F3F3F3;text-decoration:none;font-weight:normal;
background:#C00;width: 91px;
}
#nav li:hover ul {
left: auto;
}
#nav li.sfhover ul {
left: auto;
}
#content {
clear: left;
}
</style>
<script type=text/javascript><!--//--><![CDATA[//><!--
function menuFix() {
var sfEls = document.getElementById("nav").getElementsByTagName("li");
for (var i=0; i<sfEls.length; i++) {
sfEls[i].onmouseover=function() {
this.className+=(this.className.length>0? " ": "") + "sfhover";
}
sfEls[i].onMouseDown=function() {
this.className+=(this.className.length>0? " ": "") + "sfhover";
}
sfEls[i].onMouseUp=function() {
this.className+=(this.className.length>0? " ": "") + "sfhover";
}
sfEls[i].onmouseout=function() {
this.className=this.className.replace(new RegExp("( ?|^)sfhover\\b"),
"");
}
}
}
window.onload=menuFix;
//--><!]]></script>
来源:https://www.cnblogs.com/net2/archive/2010/07/27/1786267.html