by MostExtremeCake · 15y ago · 0 comments
For more complicated animation, css can perform better than javascript because the browser is allowed to optimize css animation as it sees fit.
For example: a browser will stop trying to figure out the position of an element animated using css when you switch to a different tab. It will then "catch up" when you switch back. With javascript, it does not have that option an will continue to animate all elements even when you can't actually see the tab. This can eat into battery life.
No comments yet.