5
I am developing a web page where I use numerous effects in CSS. among one of them I realized that I can not ultilizar the filters in Firefox. Searching the internet I found some solutions that tell me to use SVG files. The problem is when I need to use 2 filters on the same element, for example invert the color of an image and put shade. In Chrome I can do it that way:
div img{
-webkit-filter: invert(100%) drop-shadow(0.2em 0.1em 0.3em #000);
}
When using 2 SVG in firefox, it Buga, sometimes shows an effect, sometimes shows another effect, sometimes does not show, as if it depended on which SVG was loaded last and overwrite the first.
how to resolve this impasse?
One of class
I use to turn a black and white image
.grayscale {
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); /* Firefox 3.5+ */
filter: grayscale(100%);
-webkit-filter: grayscale(100%);
}
There are several ways to add SVG in HTML, can show how you do?
– Marcos Zolnowski
@Marcoszolnowski I edited the query and entered the class as requested.
– LeandroLuk
@Leandroluk you can use the jsfiddle to post an example working... tip (:
– talles