Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/34.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动画和-moz-在绝对块中不起作用_Css - Fatal编程技术网

css动画和-moz-在绝对块中不起作用

css动画和-moz-在绝对块中不起作用,css,Css,这种旋转动画在mozila firefox中不起作用,但在google chrome中,它工作正常。实际上,这个问题只发生在绝对块和相对块中。通常情况下,这个动画在任何浏览器中都能正常工作。请帮忙 我的css代码如下所示 css代码: .gear1{ display:block; width:64px; height:64px; position:absolute; left:0; bottom:0; -webkit-animation-name: rotate; -webkit-a

这种旋转动画在mozila firefox中不起作用,但在google chrome中,它工作正常。实际上,这个问题只发生在绝对块和相对块中。通常情况下,这个动画在任何浏览器中都能正常工作。请帮忙

我的css代码如下所示

css代码:

.gear1{
display:block; 
width:64px; 
height:64px; 
position:absolute; 
left:0; 
bottom:0; 
-webkit-animation-name: rotate;
-webkit-animation-iteration-count: infinite; 
-webkit-animation-timing-function: linear; 
-webkit-animation-duration: 3s; 
-moz-animation-name: rotate;
-moz-animation-iteration-count: infinite; 
-moz-animation-timing-function: linear; 
-moz-animation-duration: 3s; 
-o-animation-name: rotate;
-o-animation-iteration-count: infinite; 
-o-animation-timing-function: linear; 
-o-animation-duration: 3s; 
-ms-animation-name: rotate;
-ms-animation-iteration-count: infinite; 
-ms-animation-timing-function: linear; 
-ms-animation-duration: 3s; 
animation-name:rotate; 
animation-iteration-count:infinite; 
animation-timing-function:linear; 
animation-duration:3s;}
Css动画:

@-webkit-keyframes rotate {
from {
    -webkit-transform: rotate(0deg);
}
to { 
    -webkit-transform: rotate(360deg);
}}
@-moz-keyframes rotate {
from {
    -webkit-transform: rotate(0deg);
}
to { 
    -webkit-transform: rotate(360deg);
}}
@-o-keyframes rotate {
from {
    -webkit-transform: rotate(0deg);
}
to { 
    -webkit-transform: rotate(360deg);
}}
@-ms-keyframes rotate {
from {
    -webkit-transform: rotate(0deg);
}
to { 
    -webkit-transform: rotate(360deg);
}}

这是因为在
关键帧
声明中使用了错误的供应商前缀。您需要使用与
@key-{vendor}-关键帧相同的供应商(用于转换)前缀

@-webkit-keyframes rotate {
    from {
        -webkit-transform: rotate(0deg);
    }
    to { 
        -webkit-transform: rotate(360deg);
    }
}

@-moz-keyframes rotate {
    from {
        -moz-transform: rotate(0deg);
    }
    to { 
        -moz-transform: rotate(360deg);
    }
}

@-o-keyframes rotate {
    from {
        -o-transform: rotate(0deg);
    }
    to { 
        -o-transform: rotate(360deg);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to { 
        transform: rotate(360deg);
    }
}

这是因为在
关键帧
声明中使用了错误的供应商前缀。您需要使用与
@key-{vendor}-关键帧相同的供应商(用于转换)前缀

@-webkit-keyframes rotate {
    from {
        -webkit-transform: rotate(0deg);
    }
    to { 
        -webkit-transform: rotate(360deg);
    }
}

@-moz-keyframes rotate {
    from {
        -moz-transform: rotate(0deg);
    }
    to { 
        -moz-transform: rotate(360deg);
    }
}

@-o-keyframes rotate {
    from {
        -o-transform: rotate(0deg);
    }
    to { 
        -o-transform: rotate(360deg);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to { 
        transform: rotate(360deg);
    }
}

这是因为在
关键帧
声明中使用了错误的供应商前缀。您需要使用与
@key-{vendor}-关键帧相同的供应商(用于转换)前缀

@-webkit-keyframes rotate {
    from {
        -webkit-transform: rotate(0deg);
    }
    to { 
        -webkit-transform: rotate(360deg);
    }
}

@-moz-keyframes rotate {
    from {
        -moz-transform: rotate(0deg);
    }
    to { 
        -moz-transform: rotate(360deg);
    }
}

@-o-keyframes rotate {
    from {
        -o-transform: rotate(0deg);
    }
    to { 
        -o-transform: rotate(360deg);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to { 
        transform: rotate(360deg);
    }
}

这是因为在
关键帧
声明中使用了错误的供应商前缀。您需要使用与
@key-{vendor}-关键帧相同的供应商(用于转换)前缀

@-webkit-keyframes rotate {
    from {
        -webkit-transform: rotate(0deg);
    }
    to { 
        -webkit-transform: rotate(360deg);
    }
}

@-moz-keyframes rotate {
    from {
        -moz-transform: rotate(0deg);
    }
    to { 
        -moz-transform: rotate(360deg);
    }
}

@-o-keyframes rotate {
    from {
        -o-transform: rotate(0deg);
    }
    to { 
        -o-transform: rotate(360deg);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to { 
        transform: rotate(360deg);
    }
}



为什么要在moz前缀元素上添加webkit前缀?我有一个新问题,我编辑了这个问题。。。。。。你能帮我翻译一下吗?请不要编辑,而是问一个新问题。否则,接受的答案将不再有效。Cheers@Rocky:答案发布后,请不要大幅编辑问题。它使已经提供的答案无效。在这种情况下,您也已经接受了一个。最好创建一个新问题,这样就不会限制你一天可以问多少问题:)好的。。。。。。。我会问一个新问题……为什么你会在moz前缀元素上加上webkit前缀?我有一个新问题,我编辑了这个问题。。。。。。你能帮我翻译一下吗?请不要编辑,而是问一个新问题。否则,接受的答案将不再有效。Cheers@Rocky:答案发布后,请不要大幅编辑问题。它使已经提供的答案无效。在这种情况下,您也已经接受了一个。最好创建一个新问题,这样就不会限制你一天可以问多少问题:)好的。。。。。。。我会问一个新问题……为什么你会在moz前缀元素上加上webkit前缀?我有一个新问题,我编辑了这个问题。。。。。。你能帮我翻译一下吗?请不要编辑,而是问一个新问题。否则,接受的答案将不再有效。Cheers@Rocky:答案发布后,请不要大幅编辑问题。它使已经提供的答案无效。在这种情况下,您也已经接受了一个。最好创建一个新问题,这样就不会限制你一天可以问多少问题:)好的。。。。。。。我会问一个新问题……为什么你会在moz前缀元素上加上webkit前缀?我有一个新问题,我编辑了这个问题。。。。。。你能帮我翻译一下吗?请不要编辑,而是问一个新问题。否则,接受的答案将不再有效。Cheers@Rocky:答案发布后,请不要大幅编辑问题。它使已经提供的答案无效。在这种情况下,您也已经接受了一个。最好创建一个新问题,这样就不会限制你一天可以问多少问题:)好的。。。。。。。我将问一个新问题。
-ms-
前缀可以完全删除,因为它没有被使用。一个不可预测的规则也会有所帮助。请参阅以获得解释。事实上,我用正确的前缀编辑了我的答案。通常我使用CSS创作框架为我生成它。你能帮我做一件事吗?是的,当然,如果它与同一个问题有关,只需编辑你的问题。事实上,我有一些具有绝对属性的块,它在chrome中可查看,但在firefox中不可查看。我不明白实际的错误在哪里。
-ms-
前缀可以完全删除,因为它没有被使用。一个不可预测的规则也会有所帮助。请参阅以获得解释。事实上,我用正确的前缀编辑了我的答案。通常我使用CSS创作框架为我生成它。你能帮我做一件事吗?是的,当然,如果它与同一个问题有关,只需编辑你的问题。事实上,我有一些具有绝对属性的块,它在chrome中可查看,但在firefox中不可查看。我不明白实际的错误在哪里。
-ms-
前缀可以完全删除,因为它没有被使用。一个不可预测的规则也会有所帮助。请参阅以获得解释。事实上,我用正确的前缀编辑了我的答案。通常我使用CSS创作框架为我生成它。你能帮我做一件事吗?是的,当然,如果它与同一个问题有关,只需编辑你的问题。事实上,我有一些具有绝对属性的块,它在chrome中可查看,但在firefox中不可查看。我不明白实际的错误在哪里。
-ms-
前缀可以完全删除,因为它没有被使用。一个不可预测的规则也会有所帮助。请参阅以获得解释。事实上,我用正确的前缀编辑了我的答案。通常我使用CSS创作框架为我生成它。你能帮我做一件事吗?是的,当然,如果它与同一个问题有关,只需编辑你的问题。事实上,我有一些具有绝对属性的块,它在chrome中可查看,但在firefox中不可查看。我不明白实际的错误在哪里。