用requestAnimationFrame做了动画,想用cancelAnimationFrame停止动画,结果cancelAnimationFrame不能停止动画,于是设置一个标志位来判断是否继续动画,解决问题。
用requestAnimationFrame做了动画,想用cancelAnimationFrame停止动画,结果cancelAnimationFrame不能停止动画,于是设置一个标志位来判断是否继续动画,解决问题。
转载于:https://www.cnblogs.com/miaolq/p/5897469.html