+ 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?

1st May 2019, 2:35 AM
Blake
Blake - avatar
4 Answers
+ 7
Animation that cannot be performed in CSS, then only use JavaScript. Always consider using CSS first.
1st May 2019, 2:53 AM
CalviŐ˛
CalviŐ˛ - avatar
1st May 2019, 3:40 AM
Bug Slayer
+ 4
For small design like UI you should use css, and if you want more control over your animation you should use js .
1st May 2019, 3:19 AM
Bug Slayer
+ 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.
2nd May 2019, 7:55 PM
Blake
Blake - avatar