+ 2
Animations in CSS vs. JS
Is it more efficient (amount of data being transferred, workload on browser, etc.) to create animations in CSS or JavaScript? I’m looking to creat various elements in my page, for example, an animated loading page, and I would like to understand which language it’s best for me to work with?
4 Réponses
+ 7
Animation that cannot be performed in CSS, then only use JavaScript. Always consider using CSS first.
+ 5
I found this article, you should definitely read once
https://developers.google.com/web/fundamentals/design-and-ux/animations/animations-and-performance
+ 4
For small design like UI you should use css, and if you want more control over your animation you should use js .
+ 1
Thanks everyone. In short, CSS is the best way to go if its possible. For a more detailed explanation, read Rocket Raccoon’s article.