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
Css Tweenlite将变换添加到样式而不是自定义属性_Css_Svg_Gsap - Fatal编程技术网

Css Tweenlite将变换添加到样式而不是自定义属性

Css Tweenlite将变换添加到样式而不是自定义属性,css,svg,gsap,Css,Svg,Gsap,我正在使用tweenlite和可拖动库的缩放、旋转和移动图像 TweenLite.to(image, 0, {rotation: value, transformOrigin:"50% 50%"}); TweenLite.to(image, 0, {scaleX: value, scaleY: value, transformOrigin:"50% 50%"}); Draggable.create(image, {type: "x,y", throwProps: true, zIndexBoos

我正在使用tweenlite和可拖动库的缩放、旋转和移动图像

TweenLite.to(image, 0, {rotation: value, transformOrigin:"50% 50%"});
TweenLite.to(image, 0, {scaleX: value, scaleY: value, transformOrigin:"50% 50%"});
Draggable.create(image, {type: "x,y", throwProps: true, zIndexBoost: false,
      force3D: false});
它起作用了。问题是,当我导出svg时,这个svg在任何地方都不起作用。 库将变换添加到样式属性:

 style="overflow: visible; cursor: move; touch-action: none; -webkit-user-  
select: none; transform: matrix(0.08244, 0, 0, 0.08244, 111, 17);"
transform="matrix(0.08244 0 0 0.08244 111 17)"
如何在保存svg时完全清除此样式属性,并将just transform添加为单独的属性:

 style="overflow: visible; cursor: move; touch-action: none; -webkit-user-  
select: none; transform: matrix(0.08244, 0, 0, 0.08244, 111, 17);"
transform="matrix(0.08244 0 0 0.08244 111 17)"

据我所知,库中有一些设置使用attr而不是style,但找不到使用attr的方法。

下面是一个描述解决方案的链接


如果您想清除它,可以选择转换:无。您是否使用最新版本的GSAP?(目前版本为1.18.0)。当我导出svg时,
是什么意思。。你从哪里出口。。如能提供更多信息,将不胜感激。以及codepen或jsfiddle示例。所以我们可以看到您的代码是的,它是1.18.0,我的意思是不要将转换添加到样式中,比如:但是作为属性:仅此而已。我将更改后的svg从客户端保存到服务器。如果打开svg时,图像内部带有图像,并且图像具有内部转换样式,则它在illustrator、Inkscape或IE中不起作用。它仅在chrome中起作用(来自我尝试过的版本)。我已经尝试过,但不起作用。:Draggable.create(图像,{attr:{type:“x,y”,throwProps:true,zIndexBoost:false,force3D:false});我应该换点什么吗?