let it be
行到水穷处 坐看云起时

CSS:

#nav li:hover ul, #nav li.over ul{display:block}

 

解决方法:

在<head></head>中加入这段JS即可

<script type="text/javascript">
<!--
function menuFix() {
var sfEls = document.getElementById("nav").getElementsByTagName("li");
for (var i=0; i<sfEls.length; i++) {
  sfEls.onmouseover=function() {
  this.className+=(this.className.length>0? " ": "") + "sfhover";
  }
  sfEls.onMouseDown=function() {
  this.className+=(this.className.length>0? " ": "") + "sfhover";
  }
  sfEls.onMouseUp=function() {
  this.className+=(this.className.length>0? " ": "") + "sfhover";
  }
  sfEls.onmouseout=function() {
  this.className=this.className.replace(new RegExp("( ?|^)sfhover\\b"),

"");
  }
}
}
window.onload=menuFix;

//-->
</script>

posted on 2011-11-30 13:28  流浪浪  阅读(501)  评论(0编辑  收藏  举报