不同查看器中的 animateTransform 问题
animateTransform issues in different viewers
所以我制作了一个自定义公司品牌的 SVG 动画微调器,我希望在我们发布应用程序的各种设备上使用它,包括但不限于 windows 应用程序商店。
我有一个有点复杂的 SVG,其中实际上只有一个元素需要设置动画,要超级削减它,这里有一个例子;
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="97.667px" height="99.167px" viewBox="0 0 97.667 99.167" enable-background="new 0 0 97.667 99.167" xml:space="preserve">
<radialGradient id="Spinner_1_" cx="19.126" cy="34.7881" r="45.2812" fx="54.2395" fy="6.1973" gradientUnits="userSpaceOnUse">
<stop offset="0.2788" style="stop-color:#FAEE3B;stop-opacity:0.75"/>
<stop offset="0.6303" style="stop-color:#FFCF01;stop-opacity:0.6"/>
<stop offset="0.8667" style="stop-color:#F9B916;stop-opacity:0.4"/>
<stop offset="1" style="stop-color:#F6A21D;stop-opacity:0"/>
</radialGradient>
<path id="Spinner" fill="url(#Spinner_1_)" d="M89.567,43.292c0.254,1.854,0.396,3.744,0.396,5.668c0,22.921-18.582,41.5-41.5,41.5
s-41.5-18.579-41.5-41.5c0-22.92,18.582-41.5,41.5-41.5c0.068,0,3.495-2.585,0.203-5.999c-0.01-0.01-0.026-0.001-0.04-0.001
c-26.234,0-47.5,21.266-47.5,47.5s21.266,47.5,47.5,47.5c26.233,0,47.5-21.266,47.5-47.5c0-2.583-0.214-5.116-0.61-7.588
L89.567,43.292z">
<animateTransform attributeName="transform" attributeType="XML"
type="rotate" from="0 48.8335 48.8335" to="360 48.8335 48.8335"
dur="0.6s" repeatCount="indefinite"/>
</path>
</svg>
如果我在 Firefox 中查看它,它会按预期工作,并且微调器会旋转(在整个版本中,它会围绕一个徽标旋转)。于是我在IE中试了一遍,它显示路径但不执行动画。
这是个问题,因为我只能假设一旦我将它加载到实际的应用程序(我们在前面用 Angular/HTML5/Ionic 制作)我们也将定位 windows 存储应用程序,可能会出现同样缺乏动画的情况。
我的问题是,我是否缺少某些东西来确保它在任何地方都能按预期工作?不可否认,我是一个非常棒的 xaml/xml 人,但我从未使用过 svg 的技能,但我真的很喜欢它的潜力!
所以,如果有另一双眼睛可以教我我的愚蠢,谢谢!
IE does not support SMIL natively. You can make it do so with the help of fakesmile 虽然
所以我制作了一个自定义公司品牌的 SVG 动画微调器,我希望在我们发布应用程序的各种设备上使用它,包括但不限于 windows 应用程序商店。
我有一个有点复杂的 SVG,其中实际上只有一个元素需要设置动画,要超级削减它,这里有一个例子;
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="97.667px" height="99.167px" viewBox="0 0 97.667 99.167" enable-background="new 0 0 97.667 99.167" xml:space="preserve">
<radialGradient id="Spinner_1_" cx="19.126" cy="34.7881" r="45.2812" fx="54.2395" fy="6.1973" gradientUnits="userSpaceOnUse">
<stop offset="0.2788" style="stop-color:#FAEE3B;stop-opacity:0.75"/>
<stop offset="0.6303" style="stop-color:#FFCF01;stop-opacity:0.6"/>
<stop offset="0.8667" style="stop-color:#F9B916;stop-opacity:0.4"/>
<stop offset="1" style="stop-color:#F6A21D;stop-opacity:0"/>
</radialGradient>
<path id="Spinner" fill="url(#Spinner_1_)" d="M89.567,43.292c0.254,1.854,0.396,3.744,0.396,5.668c0,22.921-18.582,41.5-41.5,41.5
s-41.5-18.579-41.5-41.5c0-22.92,18.582-41.5,41.5-41.5c0.068,0,3.495-2.585,0.203-5.999c-0.01-0.01-0.026-0.001-0.04-0.001
c-26.234,0-47.5,21.266-47.5,47.5s21.266,47.5,47.5,47.5c26.233,0,47.5-21.266,47.5-47.5c0-2.583-0.214-5.116-0.61-7.588
L89.567,43.292z">
<animateTransform attributeName="transform" attributeType="XML"
type="rotate" from="0 48.8335 48.8335" to="360 48.8335 48.8335"
dur="0.6s" repeatCount="indefinite"/>
</path>
</svg>
如果我在 Firefox 中查看它,它会按预期工作,并且微调器会旋转(在整个版本中,它会围绕一个徽标旋转)。于是我在IE中试了一遍,它显示路径但不执行动画。
这是个问题,因为我只能假设一旦我将它加载到实际的应用程序(我们在前面用 Angular/HTML5/Ionic 制作)我们也将定位 windows 存储应用程序,可能会出现同样缺乏动画的情况。
我的问题是,我是否缺少某些东西来确保它在任何地方都能按预期工作?不可否认,我是一个非常棒的 xaml/xml 人,但我从未使用过 svg 的技能,但我真的很喜欢它的潜力!
所以,如果有另一双眼睛可以教我我的愚蠢,谢谢!
IE does not support SMIL natively. You can make it do so with the help of fakesmile 虽然