32 Javascript Alternatives with Pure CSS – Updated
speckyboy.com
speckyboy.com
I'll leave it as an exercise to the reader to come up with practical applications ;)
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.
Also, if you're using jQuery (or some other framework) you necessarily add several kB to the file size before you even write any code. While a single style might be on the order of a few hundred bytes. Remember, bandwidth is money and cutting down anywhere you can is important (just ask Google).
This won't hold true for all cases, but seeing these examples has already cause me to think of several ways in which it would. Anyway, creativity loves options! So it’s definitely worth reading.
There was/is(?) the background-image on visited links "hack". Put simply, you could specify a background-image on a link to, let's say, facebook.com and you would know if the user has visited facebook because they would have loaded the image.
I'm pretty sure today's browsers don't let you specify background images on visited links because of this.