下面的代碼遍歷精靈圖像,運動-120每秒,但由於某些原因,它是跳躍從0到-120,然後以120改爲-240jQuery的:數學失敗
thismarginLeft = $this.css("margin-left").replace(/[^0-9]/g,'');
if(thismarginLeft < -360 || thismarginLeft == 0){
thismarginLeft = thismarginLeft - 120;
if(thismarginLeft < -360){
thismarginLeft = 0;
}
}
請在您的問題所有相關的代碼。 – forivall