O'Reilly logo

Mobile Web Performance Optimization by S. Niranga

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CSS animation versus JavaScript

Having a nice animation or a text effect doesn't have a direct impact on your mobile site's conversion rate, but it will give your website an attractive look and feel. Nowadays, developers use CSS or JavaScript to create animations, and both of these have negatives and positives. Which method to use totally depends on the project and what kind of animation the developer is going to use. Anyway, I think CSS animations are excellent for simple animations such as toggling the UI element state, and JavaScript animations are good for complex effects such as bouncing, playing, stopping, and so on.

Most simple animations can be created using JavaScript or CSS, but the time you have to spend creating them will be different. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required