Javascript &引用;不支持操作";使用getComputedStyle
我正在尝试从rotaion动画中获取当前的学位。 不幸的是,Firefox告诉我以下几点:Javascript &引用;不支持操作";使用getComputedStyle,javascript,css,rotation,css-animations,Javascript,Css,Rotation,Css Animations,我正在尝试从rotaion动画中获取当前的学位。 不幸的是,Firefox告诉我以下几点: NotSupportedError: Operation is not supported [Break On This Error] var style = window.getComputedStyle(el); document.getElementById('spinner'); el如下所示: NotSupportedError: Operation is not supported
NotSupportedError: Operation is not supported
[Break On This Error]
var style = window.getComputedStyle(el);
document.getElementById('spinner');
el如下所示:
NotSupportedError: Operation is not supported
[Break On This Error]
var style = window.getComputedStyle(el);
document.getElementById('spinner');
和#微调器是由动画旋转的图像:
@-moz-keyframes spinmerightroundbaby{
0%{ -moz-transform: rotate(0deg); }
100%{ -moz-transform: rotate(360deg);}
}
#spinner{
-moz-animation: spinmerightroundbaby 30s linear 0s infinite;
}
没有执行任何其他JScode
您能帮我一下吗?来检查元素是否为“null”,是否为空
易于修复:我使用jQuery提供的函数延迟执行。这很好。检查元素是否为“null”,是否为空 易于修复:我使用jQuery提供的函数延迟执行。
工作正常。该错误是由
el
为null
引起的。您的元素微调器
在运行时不存在。Ha!这可能很容易!谢谢,我现在使用jQuery提供的document.ready方法。这个错误是由el
为null
引起的。您的元素微调器
在运行时不存在。Ha!这可能很容易!谢谢,我现在使用jQuery提供的document.ready方法。这就解决了问题。下次给一个机会让发表评论的人来回答你的问题,这样你就可以接受了,这是礼貌的做法。干杯在这个问题上也帮了我的忙。谢谢下次给对方一个机会,让他对你的问题做出一个解答,这样你就可以接受了。干杯在这个问题上也帮了我的忙。谢谢