It seems that there are only four css properties that get real hardware acceleration, as Paul Lewis and Paul Irish explain: http://www.html5rocks.com/en/tutorials/speed/high-performance-animations/ (very interesting to read! ) These are: position, scale, rotation and opacity. All other css properties get nothing in most browsers and therefore can be slow.
So, some CSS animations are already super-smooth, while others will be faster in time. Especially on mobile devices. (Other technical questions in other answers)
But soon after that, libraries such as GSAP and jQuery (depending on the hood) will still change their animation method. They may even choose a method that is faster depending on the device on which the site is running.
(For example: you can already use the jQuery transit plugin to use CSS3 animations from jQuery. Http://ricostacruz.com/jquery.transit/ )
So:
Will CSS3 be faster than Javascript?
Yes. But:
Should we program the animation using CSS3 or still with Javascript?
This is a different story and depends on your needs.
If you are animating a small hover effect using opacity: CSS3 is your way. Easy, clean, fast.
For complex animations, different interactions, etc. you will need to use JS, which will also give you the flexibility of choosing an animation method later. Especially GSAP is ridiculously strong and easy to write.
source share