Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/redis/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
Javascript &引用;不支持操作";使用getComputedStyle_Javascript_Css_Rotation_Css Animations - Fatal编程技术网

Javascript &引用;不支持操作";使用getComputedStyle

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

我正在尝试从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
[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方法。这就解决了问题。下次给一个机会让发表评论的人来回答你的问题,这样你就可以接受了,这是礼貌的做法。干杯在这个问题上也帮了我的忙。谢谢下次给对方一个机会,让他对你的问题做出一个解答,这样你就可以接受了。干杯在这个问题上也帮了我的忙。谢谢