polygon { stroke: none; fill-opacity: 0.5; stroke-linejoin: round; stroke-linecap: butt; position: relative; z-index: 1; } polygon.setting:hover { stroke-width: 0.02px; stroke: red; cursor: pointer; } polygon.setting:active { fill-opacity: 0.7; stroke-width: 0.02px; stroke: green; cursor: pointer; } polygon.setting.active { fill-opacity: 0.7; stroke-width: 0.02px; stroke: green; cursor: pointer; z-index: 2; }