fanyifanbumaimeng / Articles

记录下自己每天阅读的文章
1 stars 1 forks source link

高性能 CSS3 动画 #2

Open fanyifanbumaimeng opened 8 years ago

fanyifanbumaimeng commented 8 years ago

https://github.com/AlloyTeam/Mars/blob/master/performance/high-performance-css3-animation.md

fanyifanbumaimeng commented 8 years ago

仅在性能需要提升时的时候使用3D变形来提升GPU加速。 -webkit-transform: translate3d(0, 0, 0); -moz-transform: translate3d(0, 0, 0); -ms-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0);

利用hack解决画面卡顿问题: -webkit-backface-visibility: hidden; -moz-backface-visibility: hidden; -ms-backface-visibility: hidden; backface-visibility: hidden;

-webkit-perspective: 1000; -moz-perspective: 1000; -ms-perspective: 1000; perspective: 1000;