兼容IE6 7 8 FF下拉菜单支持IE6:hover属性<style type="text/css"><!--*{ margin:0; padding:0;}.s1{ width:300px; height:30px; overflow:hidden; margin:0px
兼容IE6 7 8 FF下拉菜单支持IE6:hover属性
<style type="text/css">
<!--
*{ margin:0; padding:0;}
.s1{ width:300px; height:30px; overflow:hidden; margin:0px auto 0px auto;}
#s2{width:300px; height:30px; overflow:hidden;}
#s2 .b1{width:100px; height:30px; overflow:hidden; float:left; background:#CCC; text-align:center;}
#s2 .b1 .b2{ position:absolute; margin:30px auto auto -74px; display:none; background:#09F;width:100px; height:30px; overflow:hidden;}
#s2 .b1:hover .b2{ display:block;}
-->
</style>
<script type="text/javascript">
function fnOver(thisId,showid){
var thisClass = thisId.className;
var overCssF = thisClass;
if(thisClass.length>0){thisClass = thisClass+" "};
thisId.className = thisClass + overCssF+"hover";
document.getElementById(showid).style.display="inline";
}
function fnOut(thisId,hidid){
var thisClass = thisId.className;
var thisNon = (thisId.className.length-5)/2;
thisId.className=thisClass.substring(0, thisNon);
document.getElementById(hidid).style.display="none";
}
</script>
<!--修改用的时候只需要修改onmouseover="fnOver(this,'b2')和id="b2"就可以用了-->
<div class="s1">
<div id=s2>
<div class="b1" onmouseover="fnOver(this,'b2')" onmouseout="fnOut(this,'b2')">网站频道
<div class="b2" id="b2">www.v404.cn</div>
</div>
<div class="b1">测试2</div>
<div class="b1">测试3</div>
</div>
</div>