Hacker News new | ask | show | jobs
by rglullis 5358 days ago
Only the animation that shows the image on the background. Basically it is one "transition" directive from the background of a button into a pre-processed thumbnail.

I would be more impressed if the css was also responsible for cropping the larger image and creating a sprite for the button.

1 comments

You can, it wouldn't be too hard - just use the full-size image for the thumbnail and set the background-size and background-position properties to "crop" it. This would have the bonus effect of pre-loading the next image, and would let you let you change the cropping of the image on the fly without re-processing thumbnails.