JavaScript中的动画可能很难创建,甚至难以优化性能。 了解如何通过requestAnimationFrame
使两者都变得更好! 该截屏视频的演示可以在Codepen中找到。 您可以从以下截屏中找到提到的链接:http://html5hub.com/request-animation-frame-for-better-performance/
这是JS Performance in Mind系列的第一部视频。
正在加载播放器…
From: https://www.sitepoint.com/watch-performance-with-requestanimationframe/