I got a svg with paths, and i have css hover on them, but hover sometimes work, sometimes not.
What can be the problem?
The following fixed my problem with svg and jQuery hover and alike.
svg, svg * {
pointer-events: none;
}
There's no fill so the interior does not catch mouse events by default and therefore hover doesn't react to that. Changing pointer-events to all will fix it in this case:
path{
fill:none;
stroke:black;
pointer-events:all;
}
This always works for me when using object tag
object {
pointer-events: none;
}