📌  相关文章
📜  如何在 javascript 代码示例中停止 requestanimationframe

📅  最后修改于: 2022-03-11 15:04:06.709000             🧑  作者: Mango

代码示例1
Canceling requestAnimationFrame() #
If you assign your requestAnimationFrame() method to a variable, you can use the cancelAnimationFrame() method to cancel it before it runs. // Setup the animation var animation = window. requestAnimationFrame(function ()