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
CSS In Depth
使用 will-change 控制绘制图层 will-change 的属性对渲染图层添加控制。这个属性可以提前告知浏览器,元素的特定属性将改变。这通常意味着元素将被提升到自己的绘制图层。例如,设置了 will-change: transform 就表示我们将要改变元素的 transform属性。 除非遇到性能问题,否则不要盲目添加该属性到页面,因为它会占用很多的系统资源
只有 tranfrorm 3D 变换会提升元素到自己的图层,现在已经不是这样了,最新的浏览器对 2D 变换也可以使用 GPU 加速
The text was updated successfully, but these errors were encountered:
No branches or pull requests
布局
绘制
合成
使用 will-change 控制绘制图层
will-change 的属性对渲染图层添加控制。这个属性可以提前告知浏览器,元素的特定属性将改变。这通常意味着元素将被提升到自己的绘制图层。例如,设置了 will-change: transform 就表示我们将要改变元素的 transform属性。
除非遇到性能问题,否则不要盲目添加该属性到页面,因为它会占用很多的系统资源
只有 tranfrorm 3D 变换会提升元素到自己的图层,现在已经不是这样了,最新的浏览器对 2D 变换也可以使用 GPU 加速
The text was updated successfully, but these errors were encountered: