I'm trying to change the opacity of an image (color image with applied grayscale effect) when hovering over it.
The hover effect is not working in firefox, even though firefox seems capable of displaying different opacities in combination with the grayscale effect. This is my CSS:
#nav_current{
filter: url(filters.svg#grayscale); /* Firefox 3.5+ */
filter: gray; /* IE6-9 */
-webkit-filter: grayscale(1); /* Google Chrome & Safari 6+ */
opacity: .8;
}
#nav_current:hover{
opacity: 1;
}
I also tried using the more specific opacity:
-webkit-opacity: 0.8;
-moz-opacity: 0.8;
filter:alpha(opacity=80);
But it is still not working in Firefox.
Here's the html:
<div id="nav_current" class="thumb_nav_side">
<img src="image.jpg" alt="description">
</div>
the svg:
<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>