Hover image effect
-
Hey,
I’m trying to add an effect to images I upload with site origin image widget. In the attributes tab I add custom css code but it does not work on hover.
example code:
img.grayscale {
filter: url(“data:image/svg+xml;utf8,<svg xmlns=\’https://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: gray; /* IE6-9 */
-webkit-filter: grayscale(100%); /* Chrome 19+ & Safari 6+ */
}img.grayscale:hover {
filter: none;
-webkit-filter: grayscale(0%);
}Any ideas how to make it work? It turns grey but doesnt turn to color on mouseover.
- The topic ‘Hover image effect’ is closed to new replies.