-1

I'm having trouble changing the opacity on my SVG paths with a hover. Here's my code:

<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>
4

2 に答える 2

3

不透明度が正しくない代わりに不透明度が必要

于 2012-09-06T21:10:39.487 に答える
3

タイプミスがあります:

path:hover{opactiy:0.5;}

そのはず:

path:hover{opacity:0.5;}
于 2012-09-06T21:11:33.460 に答える