我无法通过悬停更改 SVG 路径上的不透明度。这是我的代码:
<html>
<head><style>path:hover{opactiy:0.5;}</style></head>
<body>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
<path class='slice' id='slice1' d='M200,200 L199,20 A180,180 0 0,1 380,199 z' fill='#000'/>
<path class='slice' id='slice2' d='M200,200 L380,199 A180,180 0 0,1 305,345 z' fill='#468966'/>
<path class='slice' id='slice3' d='M200,200 L305,345 A180,180 0 0,1 200,380 z' fill='#FFF0A5'/>
<path class='slice' id='slice4' d='M200,200 L200,380 A180,180 0 0,1 54,94 z' fill='#FFB03B'/>
</svg>
</body>
</html>