最贊回答 / swallowlll_lll
看到其他同學的問答,發現問題了,需要在回歸cb&&cb();之后添加renturn false;即可恢復正常,小球的運行速度和第二次回復速度都正常了。停止循環即可正常。
2018-06-11
style.marginLeft 報錯Cannot read property 'style' of undefined
刪掉下面這個方法的參數
function _animate() {...}
刪掉下面這個方法的參數
function _animate() {...}
2018-06-01
ball.style.marginLeft = marginLeft + 'px';
2018-06-01
已采納回答 / 慕移動6488646
function?promiseAnimate(ball,distance){ ????return?new?Promise(function(resolve,reject){ ????????function?_animate()?{ ????????????setTimeout(function?()?{ ????????????????var?marginLeft?=?parseInt(bal...
2018-05-24