87,915
社区成员
发帖
与我相关
我的任务
分享
window.onload = function ()
{
var oUl = document.getElementById ('ul1');
var t,o;
var speed = 0;
var funny = function ()
{
t && clearInterval(t);
t = setInterval (function ()
{
speed -= 200/11;
if(speed<-200){
speed=0;
oUl.appendChild (oUl.children[0]);
t && clearInterval(t);
t = null;
o && clearTimeout(o);
o=setTimeout(funny,500);
}
oUl.style.left = speed + "px";
}, 60);
}
funny ();
}