动画沿着SVG路径DIV元素我有一个SVG路径:通过点击一个按钮
<path d="M124 442 L124 442 L166 393 L162 332 L200 251 L179 76" stroke="red" stroke-width="2" fill="none" fill-opacity="0.1"></path>
而且我要的是沿着这条路径的DIV元素的举动,当我点击“下一个”按钮。
这就像:
*startpoint (beginning of the path) + DIV element
*click next-button* + DIV element moves to station 1
*station 1
*click next-button* + DIV element moves to station 2
*station 2
*click next-button* + DIV element moves to the end of the path
endpoint (end of the path)
有没有人有一个想法,我怎么能做到这一点?
可能重复(http://stackoverflow.com/questions/11497494/animating-a-div-along-svg-path) – 2013-03-28 11:01:10