We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
重绘:不影响布局的改变(color、background-color等等) 回流:影响布局的改变(border、padding、margin等等)
回流必定会发生重绘,重绘不一定会引发回流
浏览器通过维护队列,一定时间(1000 / 60 = 16.6ms)内执行更新,清空队列。为了获取最新的值,以下属性会让浏览器的强制提前更新,导致渲染,也就触发回流。
对于css
对于js
介绍下重绘和回流(Repaint & Reflow),以及如何进行优化
The text was updated successfully, but these errors were encountered:
sihai00
No branches or pull requests
定义
重绘:不影响布局的改变(color、background-color等等)
回流:影响布局的改变(border、padding、margin等等)
回流必定会发生重绘,重绘不一定会引发回流
浏览器优化
浏览器通过维护队列,一定时间(1000 / 60 = 16.6ms)内执行更新,清空队列。为了获取最新的值,以下属性会让浏览器的强制提前更新,导致渲染,也就触发回流。
减少重绘和回流
对于css
对于js
参考
介绍下重绘和回流(Repaint & Reflow),以及如何进行优化
The text was updated successfully, but these errors were encountered: