Hacker Newsnew | past | comments | ask | show | jobs | submit | ruffdev's commentslogin

Pure class from The Economist


This's pretty good if it's just CSS


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.


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.


Why do we have a semicolon at the start?

;(function(global)


thanks for all these points. I am doing a presentation tomorrow on the same and all these points will help!


Just for the info, for all those using SQLLite with Rails, check this add-on https://addons.mozilla.org/en-US/firefox/addon/sqlite-manage...


SQLite is a good engine, but it's still an in process (or desktop) style engine. In process engines have inherent weaknesses in terms of concurrency that make them a fundamentally poor choice over server-based engines like MySQL for web sites or other scenarios with the potential for a lot of simultaneous write access.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: