<div class="codetitle"> <span><a style="CURSOR: pointer" data="86152" class="copybut" id="copybut86152" onclick="doCopy('code86152')"><u>复代码</u></a></span> 代码如下:</div> <div class="codebody" id="code86152"> <br><!DOCTYPE HTML> <br><html> <br><머리> <br><meta http-equiv="content-type" charset="utf-8" /> <br><meta http-equiv="content-type" content="text/html" /> <br><제목>데모</제목> <br></head> <br><style type="text/css"> <br>ul,li,img{margin:0;padding:0;border:0;} <br>#list{height:250px;list-style-type:none;overflow:hidden;} <br>< /스타일> <br><본문> <br><div id="odiv" 스타일="위치:absolute;width:200px;height:100px;배경:red;left:0;border:1px solid #333;"></div> <br><script type="text/javascript"> <br>var odiv=document.getElementById('odiv'); <br>odiv.onmouseover=function(){ <br>move(this,'width',500,function(){ <br>move(odiv,'left',300,function(){ <br>move( odiv,'height',500,function(){ <br>move(odiv,'borderWidth',10) <br>}) <br>})});} <br>function move(obj,arr,target ,fn){ <br>var dt=null,speed=0,ol=0; <br>clearInterval(dt); <br>dt=setInterval(function(){ <br>ol=parseInt(obj.style[arr]); <br>if(ol==target){ <br>clearInterval(dt); <br>if( fn) fn(); <br>}else{ <br>speed=(target-ol)/8 <br>speed>0?speed=Math.ceil(speed):speed=Math.floor(speed); <br>obj.style[arr]=ol 속도 "px" <br>} <br>},30); <br>} <br></script> <br></body> <br></html> <br> </div>