Hacker News new | past | comments | ask | show | jobs | submit login

So are most browser animations done with javascript or css? Seems like from vinhboy's comment most are done in javascript.

I know there are a ton of advantages to using css for animation, so why do most people use javascript? Easier to code?

Oh and btw, this is awesome. I will definitely be using some of these animations in the future. Thanks :)




The benefits of CSS animations are plenty. Unfortunately, support is still very scarce: the Webkit team brought the animation property to the CSS3 specification. Mozilla have only very recently added support in Firefox.

however, both Microsoft and Opera have announced support in their upcoming releases.

In my opinion, CSS animation are much easier to write than Javascript animations, and don't require external libraries such as jQuery.


At this point I'm not sure most web developers consider jQuery an external library. Heh.


For many things it's not hard to get 60 frames per second with javascript and you have tremendous flexibility that is hard to replicate css, in my experience. For instance, I had a hard time synchronizing all my css animations but found it easy enough in javascript.


No IE support and Mozilla's is still in infancy. They only work nicely in Webkit at the moment, so JavaScript it is.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: