<svg width="400" height="400" viewBox="0 0 100 100">
<defs>
<linearGradient id="linear" x1="0" y1="0" x2="1" y2="0">
<stop offset="0" stop-color="blue" stop-opacity="0.2"></stop>
<stop offset="0.5" stop-color="red"></stop>
<stop offset="1" stop-color="#58bf78"></stop>
</linearGradient>
</defs>
<polygon points="20 0 40 20 20 40 0 20" fill="url(#linear)">
<animateTransform attributeName="transform" type="translate" values="20 20" begin="2s"></animateTransform>
<animateTransform attributeName="transform" type="rotate" values="90 20 20" begin="4s" ></animateTransform>
</polygon>
</svg>
代码如上所示,本来是想两个类型的 transform 进行叠加,而最终结果却是 rotate 生效了,translate 失效了,这个怎么解决还是说 animateTransform 特性如此