Thumbnails from black and white to color
-
Hi, I’m using the ubud theme on my blog, right now I have manually put the featured images in Black and White but I would really love if someone could help me to make them be in black and white and then go to color when hovering.
The blog I need help with is: (visible only to logged in users)
-
This should desaturate the image by default:
.entry-thumbnail img { -webkit-filter: grayscale(100%); filter: grayscale(100%); }And on hover, you can remove the filter:
.entry-thumbnail img:hover { -webkit-filter: none; filter: none; } -
-
Is there a way to make the filter go away once I click the thumbnail so that the featured image in the actual post would be in color?
-
Oh sure! On your single posts, you’ll want to be more specific with the second CSS block mentioned above and remove the hover psudo element:
.single .entry-thumbnail img { -webkit-filter: none; filter: none; } -
-
-
Hi there, I would also suggest adding the Firefox specific rule as well, just to make sure you have everything covered. It would be like the webkit filter, but it would begin with moz like this:
-moz-filter: ________; -
Great point, Richard. I don’t believe there’s a -moz rule for filter though. To bring compatibility to FF 10 or below, you’d need to use SVG filters. Since that represents about 1% of FF users, it thought it might not be worth mentioning.
-
- The topic ‘Thumbnails from black and white to color’ is closed to new replies.