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

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

為啥我頻繁移動(dòng)鼠標(biāo)后,立即移出,寬度成這樣了

<!DOCTYPE?html>

<html?lang="en">


<head>

????<meta?charset="UTF-8">

????<meta?name="viewport"?content="width=device-width,?initial-scale=1.0">

????<title>動(dòng)畫效果</title>

????<link?rel="stylesheet"?href="../css/animation2.css">

????<script?src="../js/animation2.js"></script>

</head>

<style>

*?{

????margin:?0;

????padding:?0;

}


ul,

li?{

????list-style:?none;

}


ul>li?{

????width:?200px;

????height:?100px;

????background-color:?yellow;

????margin-top:?20px;

????border:?4px?solid?#000;

}

</style>

<script>

window.onload?=?function()?{

????var?oLi?=?document.getElementsByTagName("li");

????for?(var?i?=?0;?i?<?oLi.length;?i++)?{

????????oLi[i].timer?=?null;

????????oLi[i].onmouseover?=?function()?{

????????????startMove(this,?400);

????????}

????????oLi[i].onmouseout?=?function()?{

????????????startMove(this,?200)

????????}

????}

}


function?startMove(obj,?iTarget)?{

????clearInterval(obj.timer);

????var?icur?=?parseInt(getStyle(obj,?'width'));

????var?speed?=?(iTarget?-?icur)?/?10;

????speed?=?speed?>?0???Math.ceil(speed)?:?Math.floor(speed);

????obj.timer?=?setInterval(function()?{

????????icur?=?parseInt(getStyle(obj,?'width'));

????????if?(icur?==?iTarget)?{

????????????clearInterval(obj.timer);

????????}?else?{

????????????obj.style.width?=?icur?+?speed?+?"px";

????????????console.log(obj.timer,?iTarget,?icur,?speed,?obj.style.width)

????????}

????},?30);


}


function?getStyle(obj,?attr)?{

????if?(obj.currentStyle)?{

????????return?obj.currentStyle[attr];?//獲取當(dāng)前元素使用的CSS屬性值(添加過border之后的值),obj.style獲取的是內(nèi)聯(lián)樣式值

????}?else?{

????????return?getComputedStyle(obj,?false)[attr];

????}

}

</script>

<body>

????<ul>

????????<li></li>

????????<li></li>

????????<li></li>

????</ul>

</body>


</html>


http://img1.sycdn.imooc.com//6059ceab0001b22719201080.jpg


正在回答

2 回答

就是沒有把畫面跟上

0 回復(fù) 有任何疑惑可以回復(fù)我~

寬度在添加

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

為啥我頻繁移動(dòng)鼠標(biāo)后,立即移出,寬度成這樣了

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

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

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

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