在IE9 +中使用CSS3动画 [英] Using CSS3 Animations in IE9+

查看:731
本文介绍了在IE9 +中使用CSS3动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在试图让这些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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆