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

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

代碼運行無效果,麻煩幫忙看一下。

<!DOCTYPE html>
<html>
<head>
?<meta charset="UTF-8">
?<title>Document</title>
?<style type="text/css">
??*{margin:0;padding: 0}
??ul{list-style: none;height: 50px;border-bottom: 5px solid #f60;padding-left: 30px}
??li{float: left;margin-top: 20px}
??a{display:block; height:30px;text-align:center; line-height:30px; width:120px; margin-bottom:1px;color:#333;text-decoration:none; background-color: #ccc}
??.on,a:hover{color:red;height: 30px;line-height: 30px;background-color: black;}
?</style>
?<script>
??window.onload=function(){
???var aA=document.getElementsByTagName('a');
???for(var i=0;i<aA.length;i++)
????aA[i].onmounseover=function(){
?????var This=this;
?????setInterval(function(){
??????This.style.width=This.offsetWidth+8+"px";?????},30)
????}
??}?</script>
</head>
<body>
?<ul >
??<li><a href="#">課程</a></li>
??<li><a href="#">職業(yè)路徑</a></li>
??<li><a href="#">實戰(zhàn)</a></li>
??<li><a href="#">原文</a></li>
??<li><a href="#">手記</a></li>
?</ul>
</body>
</html>

正在回答

3 回答

不好意思,剛打錯了,應該寫成onmouseover

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

你寫的onmounseover多了一個應該寫成?onmouseove,還有for循環(huán)后面少了一個{}

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

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)

}

}

}

-----------------------------------試試這個代碼

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

你懂幾個問題 提問者

謝謝。
2017-02-13 回復 有任何疑惑可以回復我~

舉報

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

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

進入課程

代碼運行無效果,麻煩幫忙看一下。

我要回答 關注問題
微信客服

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

幫助反饋 APP下載

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

公眾號

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