Jump to content

Js Animations Obsolete?


Stefany93

Recommended Posts

Hi there,

 

I was turning the pages of a JS book the other day and I stumbled upon JS animations. I am wondering, with the invention of CSS3, does it make using scripted animations deprecated since it is way faster to use CSS instead, or CSS still can't do what JS can?

 

Thank you.

 

Best Regards

Stefany

Edited by Stefany93
Link to comment
Share on other sites

As mentioned CSS3 gives you transformations, which are (with a few caveats) hardware accelerated. That means they'll out perform any JS-based animation. So yeah, in the future, JS animations will become obsolete. Right now though it's the same old story; not enough browsers support them to drop the legacy way completely.

 

the problem is that you can't to control them.

 

What do you mean you can't control them? It's perfectly possible to control them.

Link to comment
Share on other sites

As mentioned CSS3 gives you transformations, which are (with a few caveats) hardware accelerated. That means they'll out perform any JS-based animation. So yeah, in the future, JS animations will become obsolete. Right now though it's the same old story; not enough browsers support them to drop the legacy way completely.

 

 

 

What do you mean you can't control them? It's perfectly possible to control them.

 

 

Right, so for now it is better to make animations with JS than with CSS since most of the browsers won't support it while JS has been supported for years.

I got it.

Recently I read that you no longer need to enclose your JS code with HTML comments for browser comparability, every browser support JS now which is awesome.

Link to comment
Share on other sites

Right, so for now it is better to make animations with JS than with CSS since most of the browsers won't support it while JS has been supported for years.

I got it.

 

Nope. It's better to use CSS where possible, and fall back to Javascript when not. Assuming you're willing to implement it twice that is.

 

Recently I read that you no longer need to enclose your JS code with HTML comments for browser comparability, every browser support JS now which is awesome.

 

I haven't worried about putting comments in for a long time now.

Link to comment
Share on other sites

Nope. It's better to use CSS where possible, and fall back to Javascript when not. Assuming you're willing to implement it twice that is.

 

 

 

I haven't worried about putting comments in for a long time now.

 

 

Right, thank you very much. So use CSS when possible and when not then JS.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.