如果只有一个动画的话 **repeatCount="indefinite" 就可以了
<svg>
<rect x='20' y='20' width='250' height='250' fill='blue'>
<animate attributeType="CSS" attributeName="width" from="250" to="0" dur="1s" repeatCount="indefinite" />
</rect>
</svg>
如果2个以上动画的话,怎么让两个动画作为一组循环
<svg>
<rect x='20' y='20' width='250' height='250' fill='blue'>
<animate attributeType="CSS" attributeName="width" from="250" to="0" dur="1s" />
<animate attributeType="CSS" attributeName="width" from="0" to="250" begin='1s' dur="1s"/>
</rect>
</svg>
如果只是单纯的改变宽度,少年可以这样实现