Jump to content

Thumbnail change on hover

Recommended Posts

  • Replies 1
  • Views 971
  • Created
  • Last Reply

The best way to do this would be to have the black and whiteimages loaded to the site and a script to swap the color and grayscale versions. 

However, there's a rough and ready pure css way of doing it using filters. 

#projectThumbs a:hover img {
	filter: grayscale(1) brightness(6);
}

This effectively grayscales the image and then blows out the intermediate shades of gray using brightness. 

It's not perfect - fine detail is lost in some images.  However, I think that could be tweaked by creating custom brightness values for specific images.

As I say, the best way is to use scripting to image swap. 

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.