0

我想为 SVG 中的动画持续时间设置一个全局值,可能是通过 CSS。但是,下面的代码并未设置所需的持续时间。

  <style>
     .animate {
      dur: 5s
     }
  </style>
  <animateTransform class="animate" id="at1" attributeName="transform" type="translate" begin="showLine.begin+0s" fill="freeze" from="0,100" to="0,500"/>

有没有办法为 SVG 中的动画长度设置全局默认值?谢谢。

4

1 回答 1

1

不,SMIL 动画使用属性而不是 CSS 属性,因此您不能使用 CSS 设置它们。

于 2013-09-08T17:51:30.390 回答