Iパスを使用しています:上記のように、私は円をアニメートするホバーでSVG animateMotionを停止するには?
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 400 400" xml:space="preserve">
<g class="path path--1">
<path class="path_layer" id="path1" d="M200,240c-80,0 -80,-80 0,-80c80,0 80,80 0,80" stroke="#333333" stroke-width="2" fill="none"/>
</g>
<circle r="5" fill="white" id="planet">
<title>Computer Science</title>
<animateMotion dur="15s" repeatCount="indefinite" keyPoints="0.5;0;1;0.5" keyTimes="0;0.5;0.5;1" calcMode="linear">
<mpath xlink:href="#path1" />
</animateMotion>
</circle>
それに沿っ。
ここで、私はホバーのアニメーションを停止したいと思います。 サークル上を移動すると、アニメーションを停止してから、停止した場所からアニメーションを再開したいと考えています。 CSSの方法はこれでは機能しません。私はJSを使うべきですか?もしそうなら、どうしたらいいですか?
いいえ、これはSVGです。これはSVGの要素を指定された答えで制御することはできません。 –