编辑下面的代码:【加编码】
<html> <body> <p><b>Note:</b> This example only works in Google Chrome.</p> <svg xmlns="http://www.w3.org/2000/svg" version="1.1"> <rect x="10" y="20" width="90" height="60"> <animatecolor id="a1" attributename="fill" from="red" to="blue" dur="3s"></animatecolor> </rect> <rect x="10" y="120" width="90" height="60"> <animatecolor id="a2" attributename="fill" from="blue" to="yellow" begin="a1.end" dur="3s"></animatecolor> </rect> <rect x="10" y="220" width="90" height="60"> <animatecolor id="a3" attributename="fill" from="yellow" to="green" begin="a2.end" dur="3s"></animatecolor> </rect> </svg> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂