📌  相关文章
📜  javascript requestanimationframe 堆栈溢出 - Javascript 代码示例

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

代码示例1
window.requestAnimFrame = function(){
    return (
        window.requestAnimationFrame       || 
        window.webkitRequestAnimationFrame || 
        window.mozRequestAnimationFrame    || 
        window.oRequestAnimationFrame      || 
        window.msRequestAnimationFrame     || 
        function(/* function */ callback){
            window.setTimeout(callback, 1000 / 60);
        }
    );
}();