跳至主要内容
CSS-Tricks
  • 文章
  • 笔记
  • 链接
  • 指南
  • 年鉴
  • 随机
搜索

标签为
will-change

3 篇文章
{
,

}
文章“我的白鲸:will-change 的用例”的直接链接
will-change

我的白鲸:will-change 的用例

 Nic Chan:

[…] the will-change property landed in major browsers in August 2015, and I’ve been on the lookout for when to use it ever since. It might seem self-evident to apply it to commonly animated properties such

…
Avatar of Chris Coyier
Chris Coyier 于 2022 年 2 月 24 日
文章“何时在 CSS 中使用 contain 和 will-change ‘正确’?”的直接链接
contain 性能 will-change

何时在 CSS 中使用 contain 和 will-change ‘正确’?

我在与 CSS 相关的性能方面存在一些盲点。一个例子就是 will-change 属性。这是一个很好的名称。你告诉浏览器某些特定属性(或 scroll-position 或内容)将会改变

.el {
  will-change: opacity;
…
Avatar of Chris Coyier
Chris Coyier 于 2021 年 11 月 26 日
文章“will-change”的直接链接
动画 will-change

will-change

CSS 中的 will-change 属性通过让浏览器知道哪些属性和元素即将被操作来优化动画,这可能会提高该特定操作的性能。

语法
will-change: <animateable-feature= scroll-position | contents | <custom-ident
  • 初始值
…
Avatar of Robin Rendle
Robin Rendle 于 2021 年 7 月 14 日

CSS-Tricks 由 DigitalOcean 提供支持。

关注 Web 开发最新资讯

订阅我们精心制作的时事通讯

DigitalOcean
  • 关于 DO
  • Cloudways
  • 法律条款
  • 获取免费信用额度!
CSS-Tricks
  • 为我们撰稿!
  • 与我们合作广告!
  • 联系我们
社交媒体
  • RSS 订阅
  • CodePen
  • Mastodon
  • X
返回顶部

© 2024 . All rights reserved.