henrycjchen / blog

henry's blog
https://henrycjchen.github.io/blog/docs/
0 stars 0 forks source link

css: 为什么 transform-translate 比 top/left 性能更优? #25

Open henrycjchen opened 4 years ago

henrycjchen commented 4 years ago

top/left 会频繁触发浏览器的 repaint, transform 会生成新的复合层,不会触发 repaint,由 GPU 单独控制,实现硬件加速

henrycjchen commented 4 years ago

《使用css3实现动画来开启GPU加速》,2018-01-25,https://www.jianshu.com/p/d1e16a2e88c1