Over a million developers have joined DZone.

CSS3 Transitions vs. jQuery Animate: Performance

DZone's Guide to

CSS3 Transitions vs. jQuery Animate: Performance

· Web Dev Zone
Free Resource

Start coding today to experience the powerful engine that drives data application’s development, brought to you in partnership with Qlik.

Rich Bradshaw has written a detailed tutorial series on CSS Transitions, Transforms, and Animation.

That alone is worth reading; but in case you weren't convinced, Rich also put together a little (and maybe a little unfair) performance comparison:

A head to head comparison of CSS transitions and jQuery's animate. Rather than setting a timer to run repeatedly, transitions are handled natively by the browser. In my rather unscientific testing, transitions are always quicker, running with a higher frame rate, especially with high numbers of elements. They also have the advantage that colours can be animated easily, rather than having to rely on plugins.

The results probably won't surprise you, and the conclusion inevitable ('use CSS3 for animation when you can') but Rich's analysis (scroll down), using the Timeline view in the Webkit Inspector, is pretty neat:

(Actually, the Timeline is pretty neat, period. I didn't know about it until now..sweet.)

So check out Rich's test and performance discussion, and maybe use Webkit Inspector's Timelinefor performance fine-tuning in the future.

Create data driven applications in Qlik’s free and easy to use coding environment, brought to you in partnership with Qlik.


Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}