第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定

為什么我的不能實現(xiàn)伸縮呢?(新聞菜單)

<style>
????*{margin:0;padding:0;text-decoration:none;}
????ul{list-style:none;border-bottom:2px red solid;height:50px;}
????.first{width:500px;margin:0 auto;}
????li{float:left;margin-left:2px;margin-top:30px;}
????a{background:#ccc;}
????.on,a:hover{color:white;background:red;height:50px;}
???</style>

我這個怎么不能實現(xiàn)伸縮呢?請大神們幫忙看看

正在回答

1 回答

window.onload=function(){????var?aA=document.getElementsByTagName('a');	for(var?i=0;?i<aA.length;?i++){		aA[i].onmouseover=function(){			var?This=this;			clearInterval(This.time);			This.time=setInterval(function(){					This.style.width=This.offsetWidth+8+"px";					if(This.offsetWidth>=160)					clearInterval(This.time);				},30)		}		aA[i].onmouseout=function(){				clearInterval(this.time);				var?This=this;				this.time=setInterval(function(){					This.style.width=This.offsetWidth-8+"px";					if(This.offsetWidth<=120){						This.style.width='120px';						clearInterval(This.time);					}				},30)		}	}}

伸縮效果是靠js代碼實現(xiàn)的

0 回復 有任何疑惑可以回復我~
#1

慕前端0798377 提問者

非常感謝!
2018-08-13 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消
導航條菜單的制作
  • 參與學習       123856    人
  • 解答問題       838    個

水平、垂直、圓角導航條菜單,讓您的技術(shù)探索之路更高效

進入課程

為什么我的不能實現(xiàn)伸縮呢?(新聞菜單)

我要回答 關(guān)注問題
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號