Why isn't -moz-animation working?

前端 未结 2 796
心在旅途
心在旅途 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:34

    Skyline is correct. Firefox does not support this, so you will need additional code to get the same or similar effects if they exist without webkit.

    Also, here is some additional information that might help you with your code or help you in deciding where to go from this point with your code if adding additional code is not an option (I ended up changing how I code to keep from being overwhelmed with code):

    http://caniuse.com/#

    http://www.quirksmode.org/webkit.html

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题