Reputation: 645
Do iOS devices render the CSS3 animations/transforms/transitions more smoothly than if I were to use jQuery to do the same animation?
Upvotes: 3
Views: 1084
Reputation: 72975
CSS3 transitions are massively faster on iOS and should be used whenever possible in preference to the old way of doing things.
If you combine transitions with transforms then you get the benefit that things are hardware accelerated, meaning that animations are very fluid, especially when many are happening at once.
Of course, you'll need to test it to see, but it's fairly easy to write a function that allows you to abstract this away. Here's one I wrote a while back - not the greatest, but it's an easy way to start off: http://css3.bradshawenterprises.com/legacy/
Upvotes: 3
Reputation: 5364
jQuery can be very slow on iOS, and it would probably use CSS3 anyway after it detected the brower's capabilities. jQuery is not necessarily fast, just cross-browser compatible. Writing HTML, CSS, and JavaScript targeted to a browser will always be faster.
Upvotes: 0