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
CSS3 animation not working in IE9
提问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);
}
});