开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜