aLi[i].onmouseout=function(){var subNav=this.getElementsByTagName("ul")[0];if(subNav){var This=subNav;clearInterval(This.time);This.time=setInterval(function(){This.style.height=This.offsetHeight-16+"px" ;if(This.offsetHeight<=0){clearInterval(This.time);}},30)}}
aLi[i].onmouseover=function(){var subNav=this.getElementsByTagName("ul")[0];
if(subNav){var This=subNav;clearInterval(This.time);This.time=setInterval(function({This.style.height=This.offsetHeight+16+"px" ;if(This.offsetHeight>120){clearInterval(This.time);}},30) }}
if(subNav){var This=subNav;clearInterval(This.time);This.time=setInterval(function({This.style.height=This.offsetHeight+16+"px" ;if(This.offsetHeight>120){clearInterval(This.time);}},30) }}
增加长度后,要用负值对齐
a:hover{hegiht:40px;line-hegiht:40px;margin-top:-10px;}
a:hover{hegiht:40px;line-hegiht:40px;margin-top:-10px;}
文本缩进:text-indent: n px;
空格用:&nbsp;
<a>标签变成块元素:display;block;
去除列表圆点:list-style:none;
去除下划线:text-decoration:none
a:hover{ background-color:#F60; color:#fff}鼠标经过的文字背景颜色和字体颜色
空格用:&nbsp;
<a>标签变成块元素:display;block;
去除列表圆点:list-style:none;
去除下划线:text-decoration:none
a:hover{ background-color:#F60; color:#fff}鼠标经过的文字背景颜色和字体颜色
aLi[i].onmouseout=function(){
var osubNav=this.getElementsByTagName('ul')[0];
if(osubNav){
var This=osubNav;
clearInterval(This.time);
This.time=setInterval(function(){
This.style.height=This.offsetHeight-16+"px" ;
if(This.offsetHeight==0)
clearInterval(This.time);
},30)
}
var osubNav=this.getElementsByTagName('ul')[0];
if(osubNav){
var This=osubNav;
clearInterval(This.time);
This.time=setInterval(function(){
This.style.height=This.offsetHeight-16+"px" ;
if(This.offsetHeight==0)
clearInterval(This.time);
},30)
}