這是JS實現的
藍色理想論壇有很多 妳搜 JS導航 就可以
下面給妳貼壹個出來
===================
<style>
#mch{
WIDTH:760px;
margin:0 auto;
text-align:center;
}
#mch ul {
padding: 0;
margin: 0;
list-style: none;
}
#mch li {
list-style: none;
float: left;
margin:0 auto;
padding: 0;
line-height:16px;
}
#mch li div{}
#mch li ul {
position:relative;
display: none;
}
#mch li:hover #mch ul, #mch li.over ul {
display: block;
}
#mch li.over{background:#aae;}
#mch ul li a{
display:block;
font-size:12px;
padding:3px 0 0 0;
width:76px;
text-decoration: none;
color: #777;
}
#mch ul li a:hover{
background-color:#f4f4f4;
}
#mch .lib ul li a{
float:left;
display:block;
width:auto;
margin:4px 0 0 0;
padding:2px 4px 0 4px;
text-align:center;
text-decoration:none;
color:#000;
}
#mch .lib a:hover{
text-decoration:none;
color: #ff2200;
}
#mch ul .lib ul li{
position:absolute;
float:left;
padding:0;
margin:0;
height:26px;
top:0;left:0;
width:760px;
background:#ffd;
}
#mch .lib li a{
display:block;
font-size:12px;
padding:4px 3px;
margin-right:1px;
text-decoration: none;
color: #777;
}
#mch .lib li a:hover{background:#eee;}
</style>
<body>
<div id="mch"></div>
<script>
var m_path="/">新浪</A></span> <A href=".yahoo.com/">雅虎中國</A> <A href="/">Google搜索</A> <a href="n.com/">CNN</a> <a href=".arkoo.com/" target=_blank>阿酷作家</A> <A href="/" target=_blank>求知求是</A> <A href="/" target=_blank>八強網</A> <A href="/?keyword=E-file%e5%ae%a2%e6%88%b7" target=_blank>>>更多網站</A></li></ul></li>'+
'</ul>';
document.getElementById('mch').innerHTML=navdata;
var dfr,dfrover,thsobj,thsobjover;
if(typeof(dPu)=="undefined")var dPu=document.location.pathname.replace(/(.*\/){0,}([^\.]+).*/ig,"$2");
if(dPu==""||dPu=="/")dPu="default";
function startList(dg) {
if (document.getElementById) {
var navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
var nA=node.getElementsByTagName('a');
node.getElementsByTagName('li')[0].style.left=-i*76+"px";
nA[0].style.background="#eee";
node.className=node.className.replace(" over", "");
if((dg==0||dg==3)&&node.parentNode==navRoot){
node.onmouseover=function() {
thsobjover=this;
clearTimeout(dfr);
dfrover=setTimeout("startList(1);thsobjover.className+=' over';thsobjover.getElementsByTagName('a')[0].style.background='#ffd';",200);
}
node.onmouseout=function() {
thsobj=this;
clearTimeout(dfrover);
dfr=setTimeout("thsobj.getElementsByTagName('a')[0].style.background='#eee';thsobj.className=thsobj.className.replace(' over','');startList(2);",2000);
}
}
if(dg==1||dg==3) continue;
for(j=0;j<nA.length;j++){
if(nA[j].pathname.replace(/(.*\/){0,}([^\.]+).*/ig,"$2")==dPu){
node.className+=" over";
nA[0].style.background="#ffd";
nA[0].style.fontWeight="800";
if(j>0)nA[j].style.background="#fe9";
nA[j].onclick=function(){this.blur();return false}
dg=3;break;
}
}
}
}
}
}
startList(0);
</script>
</body>