在IE9 +中使用CSS3动画 [英] Using CSS3 Animations in IE9+
问题描述
我一直在试图让这些css3动画在IE9工作几个小时今天,我很难!
I have been trying to get these css3 animations to work in IE9 for a few hours today and I am stumped!
我尝试实现几个JavaScript后备,但我的知识非常有限,所以他们失败。我不确定是否因为我的用户错误或代码错误而失败。
I tried implementing a few JavaScript fallbacks but my knowledge is very limited so they failed. I am unsure if it was failing due to my user errors or code errors.
这里是我的代码的jsFiddle到目前为止,我已经替换背景图像的颜色。基本上,在Firefox和Webkit浏览器中旋转的绿色和黑色方块。
Here is a jsFiddle of my code so far, I have replaced the background images with colours. Basically the green and black squares rotate in Firefox and Webkit browsers.
http:// jsfiddle .net / fJxsV /
我想让它在IE9上运行。
I want to have it running on IE9 also.
推荐答案
我会使用 Modernizr 来检测css动画不受支持。 With Modernizr,它很简单:
I would use Modernizr to detect when css animations are not supported. With Modernizr, it's as simple as:
if(!Modernizr.cssanimations) {
//jQuery fallback
}
对于使用jQuery旋转,我将使用: http://jqueryrotate.com/
As for rotating with jQuery I would use: http://jqueryrotate.com/
这篇关于在IE9 +中使用CSS3动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!