Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/svg/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Animation 什么,耽搁?_Animation_Svg - Fatal编程技术网

Animation 什么,耽搁?

Animation 什么,耽搁?,animation,svg,Animation,Svg,以下代码沿特定的#pat路径设置img动画 <switch> <g i:extraneous="self"> <path id="pat" style="stroke:url(#grad);" class="mypath" d=" M144.668,123.467c0,0-13.001-133.999-143.668-121.665"/> </g> </switch> <image xlink:href

以下代码沿特定的#pat路径设置img动画

<switch>
<g i:extraneous="self">
    <path id="pat" style="stroke:url(#grad);" class="mypath" d="
        M144.668,123.467c0,0-13.001-133.999-143.668-121.665"/>
</g>
</switch>


<image xlink:href="http://m.kaon.com/icon/17001.png" width="30" height="30" x="-15" y="-15">
  <animateMotion rotate="auto" dur="3s" repeatCount="indefinite">
    <mpath xlink:href="#pat"/>
  </animateMotion>
</image>


.

您可以添加另一个伪/pause元素来链接开始/结束……第一个元素只是一个暂停,实际上没有任何作用(因此当它不在路径上时不会消失)

<animateTransform begin="myanim.end" id="pause" dur="3s" type="translate" attributeType="XML" attributeName="transform"/>

<animateMotion id="myanim" dur="6s" begin="0; pause.end" fill="freeze">
       <mpath xlink:href="#theMotionPath"/>
</animateMotion>