Prompt a small script through jQuery or through pure CSS to bleach the image (make it black and white) when you hover the cursor.
1 answer
img:hover { filter: gray; /* IE6-9 */ filter: grayscale(100%); -webkit-filter: grayscale(100%); /* Chrome */ transition: 1s; }
<img src="https://images.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" alt="cat" />
- This example does not work, maybe something is wrong here? - SvArt713
- added a vendone prefix for Chrome - lexxl
- Can you make a smooth transition? - SvArt713
- added
transition: 1s;
- lexxl - transition does not work - SvArt713
|