How to bleach a picture (image) with CSS

Desaturate the image css

A quite common and simple to implement task – discoloration of the image using only CSS, but here is the syntax for some reason, I z head. A small note about how to Desaturate an image using CSS as a reminder and as a little lesson for web designers.

This is done using the function with very rich features filter. Next, the code and the lyrics will leave at the end.

Desaturate the image using CSS:

Where .my_img class of the desired image.

Further, in the same way just make a transition effect from obsessionnel pictures to color when you hover (or Vice versa):

This code of discolored images when you hover corcora makes it a color code after /* animation smooth transition */

– adds a smooth transition.

That principle and the whole “tricky” lesson CSS, korogoro help & how you can do nice effects for your website using only CSS with discoloration of the picture and Vice versa with the return of the discolored color the pictures (well, cheat-cheat sheet for myself).

The code works in all popular browsers (IE perverts fans, as always, rest), does not require an additional library, thus does not load the site and allows you to create cool effects with minimum effort and knowledge.


Leave a Reply

Your email address will not be published. Required fields are marked *