*{padding:0px;margin:0px;font-size:15px;}
ul{width:100px; }
a{text-decoration:none;height:30px;line-height:30px;color:#000;
background-color:#fef;display:block;text-align:center;margin-bottom:2px;
}
a:hover{color:#fff;background-color:#eef;}
ul{width:100px; }
a{text-decoration:none;height:30px;line-height:30px;color:#000;
background-color:#fef;display:block;text-align:center;margin-bottom:2px;
}
a:hover{color:#fff;background-color:#eef;}
2017-08-18
最新回答 / 誰說綠蘿不開花
在JS中應(yīng)通過ul獲取li:var oNav=document.getElementsByTagName("ul")[0]; var aA=oNav.getElementsByTagName("a");
2017-08-15
//鼠標(biāo)經(jīng)過一級菜單,二級菜單動畫下拉顯示出來
Subnav = this.getElementsByTagName("ul")[0];
Subnav.className = "";
//鼠標(biāo)離開菜單,二級菜單動畫收縮起來。
aLi[i].onmouseout=function(){
Subnav.className = "subNav";
Subnav = this.getElementsByTagName("ul")[0];
Subnav.className = "";
//鼠標(biāo)離開菜單,二級菜單動畫收縮起來。
aLi[i].onmouseout=function(){
Subnav.className = "subNav";
2017-08-14
最新回答 / Mr丶Zhang小
其實這個的作用就是去點前面的原點。但是因為給了padding:0 所以被擠到左邊去了;你給ul加一個:position:relative;left:100px;就可以看到效果了
2017-08-12
//onmouseover代碼
var This=this;
clearInterval(This.timer);
This.timer=setInterval(function(){
This.children[1].style.height=This.children[1].offsetHeight+8+"px";
//要找準(zhǔn)節(jié)點,是第二個子節(jié)點
if(This.children[1].offsetHeight>=120){
var This=this;
clearInterval(This.timer);
This.timer=setInterval(function(){
This.children[1].style.height=This.children[1].offsetHeight+8+"px";
//要找準(zhǔn)節(jié)點,是第二個子節(jié)點
if(This.children[1].offsetHeight>=120){
2017-08-09