每当我将两个矩形组合在一起时,动画就会停止工作,但它对每个矩形分别工作正常。我该如何解决这个问题?
<svg width="800" height="600" style="background-color:black">
<g id="rects">
<rect x="50" y="400" width="50"
height="20" fill="gold" />
<rect x="50" y="470" width="50"
height="20" fill="gold" />
</g>
<animate xlink:href="#rects"
attributeName="fill" dur="4s"
repeatCount="indefinite"
values="gold; gold; ivory; gold"
keyTimes="0; 0.7; 0.8; 1" />
</svg>