CSS: grayscale in IE (with percentage)

Is there a css way to serialize a div with the appropriate percentage? I can do this in non-IE browsers with webkit support:

-webkit-filter: grayscale(0.7); //eg 70% 

But in IE, I can only use a boolean function like this:

 filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); //with '1' 

Can I find out a way (maybe a non-svg way), can I granulate an image with a percentage using?

+4
source share
2 answers

Mark this link desaturate

Browser Compatibility:

Internet Explorer 5.5+, Opera 9.5+, Firefox 2+, WebKit Nightly

+2
source

@ AK proposal looks good, although I could not immediately see how to do a partial series ...

For a CSS-only solution, you can achieve a similar effect by doing everything you want, partially transparent, and putting a background color in it, for example: http://jsfiddle.net/R23LG/

Obviously, you want to play around with transparency settings, etc., to get it the way you want it.

0
source

Source: https://habr.com/ru/post/1432059/


All Articles