S
S
softshape2016-04-22 15:49:32
SVG
softshape, 2016-04-22 15:49:32

SVG ignore hover, how to make it work?

We have an SVG with a color change on hover -
.str0:hover { stroke:red; fill: blue }
If this SVG is inserted into the page, then everything works. However, if it is used as an img image - <img src="img/class-offline.svg">- then the hover will not work. Any attempt to change the CSS of this image with javaScript also fails.
What to do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anna_BS, 2016-04-22
@Anna_BS

Svg in img will not respond to hover. inserted as a normal image. For interaction, you need to insert the svg itself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question