CSS CSS3 动画在 IE9 中不起作用

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11923368/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 04:46:56  来源:igfitidea点击:

CSS3 animation not working in IE9

internet-explorercsscss-transformscss-animations

提问by hjuster

CSS3 animations are not working in IE9. Here is the jfiddle link. Is it possible to make them working on IE or i am making some silly mistake? Here is the code which is not working:

CSS3 动画在 IE9 中不起作用。这是jfiddle 链接。是否有可能让他们在 IE 上工作,或者我犯了一些愚蠢的错误?这是不起作用的代码:

@-ms-keyframes rotating {
  0% { -ms-transform: rotate(0deg); }
  100% { -ms-transform: rotate(360deg); }
}

#rotateMe{
  -ms-animation: rotating 5s linear infinite;
}

As IE doent support this functionality i have created the fallback using jquery rotate plugin

由于 IE 不支持此功能,因此我使用jquery 旋转插件创建了回退

here is my fallback function for IE:

这是我的 IE 后备功能:

$(function() {
    if (!$.support.transition){
        var angle = 0;
        var angle2 = 0;
        setInterval(function(){
              angle+=0.3;
              angle2-=0.3;
             $(".rotateRing").rotate(angle);
             $(".rotateRingReverse").rotate(angle2);
        },50);
    }
});

回答by Max Lambertini

CSS3 Animation don't work natively on IE9. There's a similar thread here

CSS3 动画不能在 IE9 上本地工作。有一个类似的主题在这里