【发布时间】:2020-10-14 15:58:03
【问题描述】:
我正在尝试为一个圆圈设置动画以沿着绘制的路径移动,但圆圈正在偏离轨道并以圆周运动旋转但来回而不是顺时针旋转。
<g id="XMLID_5_" >
<path id="XMLID_38_" class="st9" d="M198.7,67.8c-73.6,0-133.3,59.7-133.3,133.3s59.7,133.3,133.3,133.3S332,274.7,332,201.1
S272.3,67.8,198.7,67.8z M199.1,330.6c-71.8,0-129.9-58.2-129.9-129.9S127.3,70.8,199.1,70.8S329,129,329,200.7
S270.8,330.6,199.1,330.6z"/>
<path id="XMLID_15_" class="st3" d="M303.5,107c0,7-4.8,12.7-12.7,12.7c-7.9,0-12.6-5.7-12.6-12.7c0-7,4.8-12.7,12.6-12.7 C298.5,94.3,303.5,100,303.5,107"/>
<animateMotion
xlink:href="#XMLID_15_"
dur="5s"
begin="0s"
repeatCount="indefinite">
<mpath xlink:href="#XMLID_38_"/>
</animateMotion>
</g>
第一条路径是直线,第二条路径是圆。不知道怎么转成。
【问题讨论】:
标签: html svg svg-animate