lundi 20 avril 2015

Are there other methods to achieve a similar effect to filter: grayscale in IE10+?

I am using

filter: grayscale(42%);

to set the grayscale of some background images. This is obviously not supported in IE10/11 and nor are their old propriety filters. I can't use SVGs unfortunately (the images are uploaded via the CMS without the ability to manually change the image files as the users will not be capable).

As a result I wanted to see if there is anyway to achieve a similar effect to the grayscale filter using JS/JQuery or using a semi transparent overlay of some kind so I can get it working in newer versions of IE?

I've found a number of pollyfills (eg http://ift.tt/1q0ruTM / http://ift.tt/LrbEz2 / http://ift.tt/1pTbaRj) however all appear to make the image fully gray scale and don't allow partial grayscale to be used (eg 42%).

If anyone could point me in the right direction that would be greatly appreciated!

Thanks,

Dave

Aucun commentaire:

Enregistrer un commentaire