我正在尝试让内部的圆形旋转。在animateTransform的from和to中使用50%没有效果。
我还尝试将多边形放置在圆形的中心。
我还尝试将多边形放置在圆形的中心。
body {
margin: 0;
background: black;
}
#container {
background: rgba(0, 155, 255, 0.3);
padding: 10px;
}
#circle1 {
}
#circle2 {
stroke-dasharray: 20 3 55;
}
#circle3 {
stroke-dasharray: 22;
}
<div id="container">
<svg xmlns="http://www.w3.org/2000/svg" height=207px width=207px stroke="#00bd80" fill="none">
<circle id="circle1" r="100" cx="50%" cy="50%" stroke-width="7px"/>
<circle id="circle2" r="96" cx="50%" cy="50%" stroke-width="5px">
<animateTransform attributeType="xml"
attributeName="transform"
type="rotate"
from="0 98.5 98.5"
to="360 98.5 98.5"
dur="20s"
repeatCount="indefinite"/> <!-- how to center correctly -->
</circle>
<circle id="circle3" r="80" cx="50%" cy="50%" stroke-width="5px"/>
<polygon points="30,15 22.5,28.0 7.5,28.0 0,15 7.5,2.0 22.5,2.0"></polygon>
</svg>
</div>