Reputation: 5122
Is it possible in css to make only part of an image grayscale?
I have tried using filters to no avail, can't seem to think of any way to accomplish this. Do you have any ideas?
I want to make this image grayed out only under the dark part of this page.
Upvotes: 3
Views: 2316
Reputation: 490263
I've done something like this before to achieve that...
div
and set its background-image
to the image.background-position
and absolutely position it so it appears to be the same image.div
.For the exact thing that you're going for, I might make it have a black background with opacity
set as required, and a top inset shadow for the top effect.
Upvotes: 6