Neat Photo Hover Effect with CSS Sprites and jQuery

Development February 22, 2010 by cody 1 Comment

photoeffect

Here is a very nice effect for photos or some black and white images. We are using some CSS sprites for the photos to create a darken effect when hovering over the images. This could also be used with other effects. The basic principle is to create the impression that the background gets darker when hovering.

The CSS sprites image of each photo gets first loaded in the photo container. Then we add a paragraph element which has the same background image but a different background position (the dark half). This element gets faded in, so we have a smooth effect.

View demoDownload source

Tagged with: , , ,

Discussion1 Join the discussion

Follow this discussion

Join the discussion