Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/svg/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Animation 有没有办法为SVG中的动画长度设置全局默认值_Animation_Svg - Fatal编程技术网

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

Animation 有没有办法为SVG中的动画长度设置全局默认值,animation,svg,Animation,Svg,我想为SVG中的动画持续时间设置一个全局值,可能是通过CSS。但是,下面的代码未设置所需的持续时间 <style> .animate { dur: 5s } </style> <animateTransform class="animate" id="at1" attributeName="transform" type="translate" begin="showLine.begin+0s" fill="freeze"

我想为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"/>

.制作动画{
dur:5s
}

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

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