简体   繁体   English

css3过渡不可用时自动回退到jquery(Internet Explorer)

[英]Automatic fallback to jquery when css3 transition is not available (internet explorer)

当没有css3可用时(例如,在Internet Explorer 9中),是否有一个库(或jquery扩展名)提供对jquery的自动回退?

I think modernizr would work for you. 我认为modernizr将为您工作。

Modernizr is a small JavaScript library that detects the availability of native implementations for next-generation web technologies, ie features that stem from the HTML5 and CSS3 specifications. Modernizr是一个小型JavaScript库,用于检测下一代Web技术的本机实现的可用性,即,本特性源自HTML5和CSS3规范。 Many of these features are already implemented in at least one major browser (most of them in two or more), and what Modernizr does is, very simply, tell you whether the current browser has this feature natively implemented or not. 这些功能中的许多功能已经在至少一个主要的浏览器中实现(大多数功能在两个或多个浏览器中),而Modernizr所做的很简单,就是告诉您当前的浏览器是否已在本地实现此功能。

This library uses something called Polyfills for cases where an HTML5 or CSS3 feature is not supported. 对于不支持HTML5或CSS3功能的情况,该库使用称为Polyfills东西。

polyfill (n): a JavaScript shim that replicates the standard API for older browsers polyfill(n):一个JavaScript填充程序,可复制旧版浏览器的标准API

And good news for you, there is a polyfill for nearly every HTML5 feature that Modernizr detects. 对于您来说是个好消息,Modernizr检测到的几乎每个HTML5功能都有一个polyfill。 Yup. 对。 So in most cases, you can use a HTML5 or CSS3 feature and be able to replicate it in non-supporting browsers. 因此,在大多数情况下,您可以使用HTML5或CSS3功能,并能够在不支持的浏览器中复制它。 Yes, not only can you use HTML5 today, but you can use it in the past, too! 是的,您不仅可以立即使用HTML5,而且过去也可以使用它!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM