Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vue.js/6.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
Javascript 在SVG动画中围绕舞台原点以外的位置旋转路径_Javascript_Animation_Svg - Fatal编程技术网

Javascript 在SVG动画中围绕舞台原点以外的位置旋转路径

Javascript 在SVG动画中围绕舞台原点以外的位置旋转路径,javascript,animation,svg,Javascript,Animation,Svg,正在尝试制作时钟动画 当前版本如下: 看起来手正在绕舞台的0,0旋转,我不知道如何改变旋转手的点 我在这里改编自Codrops教程: 我是SVG动画的新手,因此非常感谢您的帮助。提前感谢。您可以使用rotate()变换的三参数版本指定旋转中心 transform="rotate(<angle> <cy> cy>)" transform=“旋转(cy>)” 使用动画 <animateTransform attributeName="transform"

正在尝试制作时钟动画

当前版本如下:

看起来手正在绕舞台的0,0旋转,我不知道如何改变旋转手的点

我在这里改编自Codrops教程:


我是SVG动画的新手,因此非常感谢您的帮助。提前感谢。

您可以使用rotate()变换的三参数版本指定旋转中心

transform="rotate(<angle> <cy> cy>)"
transform=“旋转(cy>)”
使用动画

<animateTransform attributeName="transform" 
                      attributeType="XML"
                      type="rotate" 
                      from="0 60 70" 
                      to="360 60 70" />

可以使用rotate()变换的三参数版本指定旋转中心

transform="rotate(<angle> <cy> cy>)"
transform=“旋转(cy>)”
使用动画

<animateTransform attributeName="transform" 
                      attributeType="XML"
                      type="rotate" 
                      from="0 60 70" 
                      to="360 60 70" />