1

So I know now CSS3 is a lot faster than jQuery, but I want to know how CSS3 is spread nowadays, is it wide-spread? I believe jQuery is better this way because, you can animate CSS2 with it as well, so older browsers show animation, but if there are only a few people using older browsers I don't think I should use jQuery, or maybe there is a solution that my app will recognize whether the browser supports css3 or not, and if not, it tries to run the animation with jQuery/JavaScript?

4

3 回答 3

4

jQuery Transit允许您使用经典的 jQuery 语法创建 CSS 动画,并且可以在不受支持的浏览器上回退到 js 动画

基本上问题是 IE < 10,所以你可以考虑只使用没有后备的 css 动画;动画可以被认为是渐进式增强,并且在某些浏览器上没有它们不会对用户体验造成太大危害。最重要的是,IE<9 的 javascript 性能很差,因此后备 js 动画无论如何都不会那么令人愉快。

于 2013-06-07T09:52:57.190 回答
0

如果您想要最大的兼容性,请使用 jQuery。很多人仍然使用旧的浏览器,例如不支持 CSS3 的 Internet Explorer 8。

来自MSDN

Microsoft Internet Explorer 6 是第一个完全符合级联样式表、级别 1 (CSS1) 的 Internet Explorer 版本。Windows Internet Explorer 8 完全符合 Cascading Style Sheets, Level 2 Revision 1 (CSS2.1) 规范,并支持 Cascading Style Sheets, Level 3 (CSS3) 的一些功能。Windows Internet Explorer 9 和 Internet Explorer 10 添加了对许多 CSS3 模块的更多支持。

于 2013-06-07T09:53:34.100 回答
0

JQuery is supported provided you have the libraries included, but not all the animations CSS is supported by all browsers.

CSS browser compatibly

于 2013-06-07T09:54:42.487 回答