【发布时间】:2015-03-08 19:32:06
【问题描述】:
为什么我在下面的代码片段中做错了?为什么在圆形结束动画后,Chrome(v 39) 和 Firefox(v 33) 中的矩形没有动画?
<!doctype html>
<html>
<head>
<title>test</title>
</head>
<body>
<svg width="500" height="350">
<circle id="orange-circle" r="30" cx="50" cy="50" fill="orange" />
<rect id="blue-rectangle" width="50" height="50" x="25" y="200" fill="#0099cc"></rect>
<animate
xlink:href="#orange-circle"
attributeName="cx"
from="50"
to="450"
dur="5s"
begin="click"
fill="freeze"
id="circ-anim"/>
<animate
xlink:href="#blue-rectangle"
attributeName="x"
from="50"
to="425"
dur="5s"
begin="circ-anim.end"
fill="freeze"
id="rect-anim"/>
</svg>
<p>Click on the circle to animate it, and animate the rectangle after it.</p>
</body>
</html>
【问题讨论】:
标签: google-chrome firefox svg