<script type="text/javascript"> window.onload=function(){ var opre=document.getElementById('pre'); var onext=document.getElementById('next'); var obox=document.getElementById('box'); function animate(buc){ var speed=parseInt(obox.style.left)+buc; obox.style.left=speed+'px'; if(speed<-3000){ obox.style.left= -600+'px'; } if(speed>0){ obox.style.left=-3000+'px'; } } opre.onclick=function(){ animate(-600) } onext.onclick=function(){ animate(600) } }</script>
無(wú)法實(shí)現(xiàn)無(wú)限滾動(dòng),求教?。。。?!
慕粉18627760491
2016-05-02 14:28:48