Jump to content

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
https://forums.phpfreaks.com/topic/270390-js-animations-obsolete/
Share on other sites

There's in CSS3 you can find transformations for elements but the problem is that you can't to control them.

There's advice: better use ready JQ or JQ UI plugins/JS solutions.

 

Just to be on the safe side, JQ means jQuery, right?

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.

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.

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.

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.

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.