jrcy6096
2017-03-06 16:43
function go(){
if ( (speed > 0 && parseInt(list.style.left) < newleft) || (speed < 0 && parseInt(list.style.left) > newleft)) {
list.style.left = parseInt(list.style.left) + speed + 'px';
setTimeout(go, inteval);
debugger;
}
else
{
animated=false;
list.style.left = newleft +"px";
if (newleft>-600) {
list.style.left =-3000+"px";
}
if (newleft<-3000) {
list.style.left =-600+"px";
}
}
}
go();
再多粘点代码~
animated未声明
焦点图轮播特效
65296 学习 · 611 问题
相似问题