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

怎样沿椭圆移动

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

正在回答

2 回答

用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
  • 参与学习       52523    人
  • 解答问题       213    个

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

进入课程

怎样沿椭圆移动

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信