Is there any advantage to using CSS animations over jQuery animations? (performance, or otherwise)

前端 未结 6 1049
执念已碎
执念已碎 2021-01-12 11:59

I mean, CSS animations are cool, but CSS3 compliance is annoyingly un-standard. but, ignoring all the issues with browsers and their inability to be up-to-date with the late

6条回答
  •  北海茫月
    2021-01-12 12:54

    CSS animations can be accelerated by the GPU, whereas Javascript animations aren't. If You know without a doubt that your user base will have support for the css version of your animations, it makes a lot of sense to choose css.

    In the case that you need to support older browsers, javascript is the right call.

提交回复
热议问题