箭头闪烁:
<polyline transform = "rotate(180.000,1072.00,212.00)" stroke="#FFFF00" stroke-width="5" fill="#FFFF00" points="1072.0 212.0,1112.0 212.0,1092.68 209.41,1092.68 214.59,1112.00 212.00">
<animate attributeName="visibility" values="hidden;visible;hidden;visible;hidden;visible" dur="1s" begin="indefinite" end="indefinite" repeatCount="indefinite" />
</polyline>
圆形透明度改变:
<circle cx='200' cy='200' r='50' stroke='blue' stroke-width='0' fill='blue'>
<animate attributeName='fill-opacity' attributeType='XML' begin='0s' dur='2s' from='1' to='0.4' fill='freeze' repeatCount="indefinite"/>
</circle>
圆形方形的转换:
<rect width="100" height="100">
<animate attributeName="rx" values="0;50;0" dur="10s" repeatCount="indefinite" />
</rect>
官方文档:
https://developer.mozilla.org/en-US/docs/Web/SVG/SVG_animation_with_SMIL
attributeName:要设置动画的属性的名称。
from:属性的初始值。
to:最终值。
dur:动画的持续时间(例如,写“ 5s”持续5秒)。