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

I mean, CSS animation is cool, but CSS3 compliance is annoyingly not standard. but, ignoring all browser issues and their inability to keep abreast of the latest W3C versions,

Is there any performance advantage over jQuery animations?

Why are they being implemented?

+7
source share
6 answers

Generally, if you avoid JavaScript, you can achieve the same result, you should .

He always preferred to use his own capabilities of the browser, since it will usually be better in performance, plus it will look generally better.

Additional points:

  • jQuery animations are not real animations, they are faked, and the native CSS3 browser animations are essentially animations. As a result, inline CSS3 animations can be accelerated by the GPU, while jQuery animations cannot.
  • Note that not all browsers support CSS3 animations / transitions. You probably want to check if the browser supports it and act accordingly.
+5
source

Animated CSS clips have the advantage of potentially speeding up hardware. Here is a demo of Scripty2 (I know this is not jQuery - but the same principles) that demonstrates this very well.

http://scripty2.com/hardware-acceleration/

+1
source

CSS animations can be accelerated by the GPU, while Javascript animations can not. If you no doubt know that your user base will support a version of your css animation, it makes sense to choose css.

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

+1
source

For all people who think that Javascript is better for browsers that are older, this is not necessarily true. Thinking that Andy Clark will take over this, it seems easier to tell an elegant story with good available fallback errors using solid semantic markup and CSS3 than with Javascript.

http://forabeautifulweb.com/blog/about/its_a_mad_mad_mad_mad_manimation/

+1
source

But css animations are not supported by every browser, this is an important issue depending on your audience.

0
source

the best advantage is that it works very smoothly on the iPad, iPhone, Android, as well as on Safari Mac due to hardware acceleration. jQuery animations are not smooth on mobile devices. In the future, CSS animations will become smooth, buttery as they are standard, but jquery will remain the same. It is a more reliable future for using these

0
source

All Articles