Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

translate3d vs translate performance

We now all know, particularly from that nice article, that we should prefer css-transforms to animate position.

But we got the choice between translate() and translate3d()...

Which one is generally faster?

like image 756
abernier Avatar asked Mar 01 '14 06:03

abernier


2 Answers

This site below runs tests comparing translate(), translate3d(), and a couple other properties. According to it, translate3d() is faster in most browsers.

http://jsperf.com/translate3d-vs-xy

like image 95
Cameron Little Avatar answered Sep 28 '22 02:09

Cameron Little


The use of translate3d pushes CSS animations into hardware acceleration. Even if you're looking to do a basic 2d translation, use translate3d for more power! So 'T3d' is just better because it tells the CSS animations to push the animations in 3d power! That's why it is faster. (The answer of Cameron Little is the proof)

like image 27
AFCA_Timon Avatar answered Sep 28 '22 03:09

AFCA_Timon