Why isn't -moz-animation working?

前端 未结 2 835
心在旅途
心在旅途 2021-01-19 18:39

The following CSS works fine in Webkit. Haven\'t checked it in Opera, but I know it\'s not working in Firefox. Can anybody tell me why?

The correct classes are defin

2条回答
  •  深忆病人
    2021-01-19 19:40

    Your animations are not working in Firefox because you are using @-webkit-keyframes, which only applies to Webkit browsers, i.e. Chrome and Safari. The (somewhat) cross-browser way to do animation keyframes is:

    @keyframes animationName {
        /* animation rules */
    }
    
    @-moz-keyframes animationName {
        /* -moz-animation rules */
    }
    
    @-webkit-keyframes animationName {
        /* -webkit-animation rules */
    }
    

    Opera and Internet Explorer do not currently support the @keyframes rule.

提交回复
热议问题