日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

html5下拉列表多行显示不出来,为什么我这个代码的效果显示不出来?我要显示的是鼠标经过选项出现下拉菜单栏!求大神提点!!!...

發布時間:2024/9/27 37 豆豆
動畫菜單

* { margin: 0; padding: 0; font-size: 14px; }

a { color: #333; text-decoration: none }

ul{ list-style: none; }

.nav {height: 30px; border-bottom: 5px solid #F60; margin-left:50px; width:600px;}

.nav li { float: left; position:relative; height:30px; width:120px }

.nav li a { display: block; height: 30px; text-align: center; line-height: 30px; width:120px; background: #efefef; margin-left: 1px; }

.subNav{ position:absolute; top:30px; left:0; width:120px; height:0; overflow:hidden}

.subNav li a{ background:#ddd }

.subNav li a:hover{ background:#efefef}

/*

window.οnlοad=function(){

var aLi=document.getElementsByTagName('li');

for(var i=0; i

aLi[i].οnmοuseοver=function(){

//鼠標經過一級菜單,二級菜單動畫下拉顯示出來

var This=this.getElementsByTagName('ul')[0];

clearInterval(This.time);

This.time=setInterval(function(){

This.style.height=This.offsetHeight+16+"px";

if(This.offsetHeight>=120){

clearInterval(This.time);

}

},30)

}

//鼠標離開菜單,二級菜單動畫收縮起來。

aLi[i].οnmοuseοut=function(){

var This=this.getElementsByTagName('ul')[0];

clearInterval(This.time);

This.time = setInterval(function(){

This.style.height=This.offsetHeight-16+"px";

if(This.offsetHeight<=0){

clearInterval(This.time);

}

},30)

}

}

}

*/

window.οnlοad=function(){

var aLi=document.getElementsByTagName("li");

for(var i=0;i

aLi[i].οnmοuseοver=function(){

//鼠標經過一級菜單,二級菜單動畫下拉顯示出來

var aUl=aLi[i].getElementsByTagName("ul")[0];

aUl.style.display="block";

}

aLi[i].οnmοuseοut=function(){

//鼠標離開菜單,二級菜單動畫收縮起來

var aUl=aLi[i].getElementsByTagName("ul")[0];

aUl.style.display="none";

}

}

}

一級菜單一級菜單一級菜單一級菜單一級菜單 創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎

總結

以上是生活随笔為你收集整理的html5下拉列表多行显示不出来,为什么我这个代码的效果显示不出来?我要显示的是鼠标经过选项出现下拉菜单栏!求大神提点!!!...的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。