js代码
<script language="javascript"> var ph=document.getElementById("phone"); var otime=null; var num=-300; function tomove(){ otime=setInterval(function (){ num+=10; if(num==1100) { num=-300; clearInterval(otime); } ph.style.backgroundPosition=num+"px 0px"; },20) } tomove(); setInterval(function(){ tomove(); },3000); </script>