//鼠标经过一级菜单,二级菜单动画下拉显示出来
Subnav = this.getElementsByTagName("ul")[0];
Subnav.className = "";
//鼠标离开菜单,二级菜单动画收缩起来。
aLi[i].onmouseout=function(){
Subnav.className = "subNav";
Subnav = this.getElementsByTagName("ul")[0];
Subnav.className = "";
//鼠标离开菜单,二级菜单动画收缩起来。
aLi[i].onmouseout=function(){
Subnav.className = "subNav";
方法一(css):
li:hover>.subNav{overflow:visible};
方法二(js):
aLi[i].onmouseover=function(){
var uls = this.getElementsByTagName('ul');
if (uls[0]) {
uls[0].style.overflow = 'visible';
}
}
aLi[i].onmouseout=function(){
var uls = this.getElementsByTagName('ul');
if (uls[0]) {
uls[0].style = null;
}
}
li:hover>.subNav{overflow:visible};
方法二(js):
aLi[i].onmouseover=function(){
var uls = this.getElementsByTagName('ul');
if (uls[0]) {
uls[0].style.overflow = 'visible';
}
}
aLi[i].onmouseout=function(){
var uls = this.getElementsByTagName('ul');
if (uls[0]) {
uls[0].style = null;
}
}
老师打的空格是全角空格,html里面理解成汉字,所以多少个全角空格都可以在html里面完全显示,不推荐使用,打多个空格还是用 
2017-07-21