-
speed為負(fù)其實(shí)代表的不是移動(dòng)速度,而是要減去的px查看全部
-
math.ceil向下取整達(dá)到0,math.floor向上取整查看全部
-
如果不想重復(fù)運(yùn)動(dòng),在函數(shù)執(zhí)行前清除定時(shí)器clearInterval()查看全部
-
獲取某個(gè)對象的屬性,并根據(jù)不同的瀏覽器返回查看全部
-
學(xué)習(xí)內(nèi)容查看全部
-
鏈?zhǔn)絼?dòng)畫 ,動(dòng)畫計(jì)時(shí)器停止時(shí)回調(diào)函數(shù) if(fn){ fn();}查看全部
-
多物體動(dòng)畫不能用公用計(jì)時(shí)器、公用元素,需定義在每個(gè)obj中,div.timer div.alpha查看全部
-
運(yùn)動(dòng)動(dòng)畫需要做Math.ceil和Math.floor取整查看全部
-
類似的函數(shù)可以把不同的地方取出作為參數(shù)傳入,避免重復(fù)查看全部
-
寫定時(shí)器setInterval函數(shù)第一條要清楚定時(shí)器,否則會(huì)多次觸發(fā)多個(gè)定時(shí)器查看全部
-
寫動(dòng)畫前要清楚瀏覽器默認(rèn)樣式*{margin:0;padding:0} 否則px會(huì)跳躍查看全部
-
<script type="text/javascript"> var json={a:12,b:13}; for(var i in json){ document.write('name:'+i+' '+'key:'+json[i]+'<br />'); } </script>查看全部
-
speed=speed>0?Math.ceil(speed):Math.floor(speed);查看全部
-
//jquery top值的寫法:加了""號 $(this).css({top:"30px"}); $(this).animate({top:"20px",opacity:"1"},300); //與js不同"20px"加了引號 //js寫法 _this.style.top=30+"px"; //類似淘寶轉(zhuǎn)一圈的效果 move(_this,{top:20,opacity:100});查看全部
-
jquary 寫法查看全部
舉報(bào)
0/150
提交
取消