设置 stroke-dasharray 来进行隔断操作
如描边循环操作 使用
<animate attributeName="stroke-dashoffset" begin="0s" from="100%" to="0%" dur="3s" repeatCount="indefinite"/>
from to 来表示内容的进度 dur 为实现动画的时间 repeatCount=indefinite来设置动画可以无限循环
需要在 需要实现动画的线条中添加stroke-dasharra这个属性 并且需要设置最大值
然后再添加动画如
<animate attributeName="stroke-dashoffset" begin="0s" from="100" to="0" dur="5s"/>