New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css] 第62天 手动写动画最小时间间隔是多少,为什么? #276
Comments
16.667ms?不是很懂题意,但是根据经验,我猜是1000ms/60FPS = 16.667ms/FPS |
46ms? 就是像素更新的频率下限, 再低人眼已经辨别不出差距了 |
|
极简的动效,而非动画,animate.css 也能满足一定场景下的使用。 至于 1e3 / 60 这玩意,它与函数调用栈以及 event loop 有点关系, |
手写动画推荐使用 requestAnimationFrame API,他会根据浏览器性能自动使用合理的间隔,而且时间远远比自己写时间间隔要准确(如果对动画精确度要求很高,setInterval 是不准的)。 |
|
第62天 手动写动画最小时间间隔是多少,为什么?
The text was updated successfully, but these errors were encountered: