【发布时间】:2014-12-09 14:07:43
【问题描述】:
SVG Path documentation 声明使用大写 (M, L) 字母表示坐标是绝对坐标。所以在这条路径中,它会到达绝对坐标 100,100。
<rect x="200" y="0" width="30" height="15" style="stroke: #ff0000;">
<animateMotion path="M0,0 L100,100" begin="0s" dur="1s" repeatCount="indefinite" />
</rect>
但这在现实中似乎并非如此。 Here is a simple fiddle 为矩形设置动画。起点为 200,0。如果它移动到 100,100,那么它应该向下和向左移动。它不是。它向右移动。怎么回事?
(我的目标是创建一个通过一系列绝对坐标移动的动画,并根据用户输入动态删除坐标,而不会影响后续动画。因此我需要使用绝对坐标。)
【问题讨论】:
标签: animation svg path jquery-animate