为了账号安全,请及时绑定邮箱和手机立即绑定

怎样沿椭圆移动

怎样实现一个元素演一个ellipse标签的椭圆移动,animatemotion对于ellipse标签的路径没有反应啊

正在回答

1 回答

用path画一个椭圆

<svg viewBox="-400 -400 800 800" width="400" height="400">

<circle cx="0" cy="0" r="8" fill="red">

<animateMotion

dur="5s"

repeatCount="indefinite"

>

<mpath xlink:href="#ell"></mpath>

</animateMotion>

</circle>

<path id="ell" d="M200 0 A200 100 0 0 1 -200 0 A200 100 0 0 1 200 0 " fill="none" stroke="gray"></path>

</svg>


0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
走进SVG
  • 参与学习       52695    人
  • 解答问题       223    个

SVG是HTML5 中矢量图的标记语言,学习后掌握更多的干货

进入课程

怎样沿椭圆移动

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号