CSS Transforms Performance
I wondered what the difference between -webkit-transform: translate(5px, 5px)
and -webkit-transform: translateX(5px) translateY(5px)
Is there any performance difference? Because translateX
is also used for 3D transforms. So my question is: Is 开发者_StackOverflow社区there any difference in calculating the transform? Can I say that translateX
is faster, because it uses the GPU? Does it?
How can I meassure the performance?
No, but -webkit-transform: translate3d(5px, 5px, 0)
will be quicker. The two syntaxes you've put are the same, mine uses the 3d context.
精彩评论