CSS3 animation performance is competitive with JavaScript, but not necessarily superior. On this page, you can test several browser animation methods and see the actual differences.
https://greensock.com/js/speed.html
CSS3 animations are executed in a separate thread than JavaScript, so it doesnβt block it very much. Therefore, CSS3 is best if your application has some load on it.
http://www.phpied.com/css-animations-off-the-ui-thread/
CSS3 animations are also often accelerated by hardware (the animation runs on the GPU instead of increasing processor performance). But there are so many JavaScript animation tools.
This is mainly technically. The coding style is wise, they also have some big differences. CSS3 animation invocation usually occurs by adding and removing dom classes from JavaScript. Thus, the behavior of your component ends up living between 2 files and in two languages. All of this can be circumvented, but it can make the code harder to reason about.
So, if you decide to go with CSS3 animations, I recommend not doing this in css, but using a JavaScript library that allows you to save CSS3 animations in JavaScript. Or you can only select a JavaScript animation library such as GreenSock. In any case, I recommend storing animations in JavaScript for workflow and ease of understanding.
source share