SVG - polygon hover does not work correclty

Viewed 5742

As you can see on gif below, :hover state does not work properly when I move the mouse cursor from bottom polygon to upper polygon:

polygon {
  stroke-width: 5;
  stroke: red;
  fill: none;
}

polygon:hover {
  fill: red;
}
<svg viewBox="0 0 999 799">
  <polygon points="445,161 345,174 500,10" />
  <polygon points="445,161 345,174 500,270" />
</svg>

[jsfiddle]

enter image description here

Tested in Chrome and Firefox - the result is the same.

How can I achieve SVG polygon turn :hover state on right after mouse cursor enters its borders?

1 Answers
Related