亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

為什么加了clearInterval(This.time); 之后就沒有伸縮的效果了

為什么加了clearInterval(This.time); 之后就沒有伸縮的效果了

FDU_XN 2016-03-31 11:13:33
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>無標題文檔</title><style type="text/css">*{margin:0;padding:0;}ul{list-style:none ;height:50px;padding-left:30px;border-bottom:5px solid #F90;}a{text-decoration:none;display:block;height:30px;line-height:30px;width:120px;background-color:#C33;margin-bottom:1px;text-align:center;}li{float:left;margin-top:20px;}.on,a:hover{background-color:#F93;height:40px;margin-top:-10px;line-height:40px;}</style><script type="text/javascript">window.onload=function(){var aA=document.getElementsByTagName('a');for(var i=0;i<aA.length;i++){aA[i].onmouseover=function(){clearInterval(This.time);var This=this;This.time=setInterval(function(){This.style.width=This.offsetWidth+8+"px";if(This.offsetWidth>=120){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)}}}</script></head><body><ul>? ? ? <li><a class= "on"href="#">首頁</a></li>? ? ? <li><a href="#">新聞快訊</a></li>? ? ? <li><a href="#">產品展示</a></li>? ? ? <li><a href="#">快線</a></li></ul></body></html>
查看完整描述

1 回答

  • 1 回答
  • 0 關注
  • 2290 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號