本文介绍了如果我已经使用Modernizr,我会甚至需要HTML5 Shiv?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

1)如果我已经在使用Modernizr,那么我是否需要HTML5 Shiv才能为IE启用HTML5标签支持?

1) If I'm already using Modernizr, will I then even need HTML5 Shiv to enable HTML5 tag support for IE?

2)HTML5 Shiv IE,还是对于没有本地HTML 5支持的所有浏览器?像旧版Firefox,Safari,Chrome等等?

2) Is HTML5 Shiv only for IE, or for all browser who don't have native HTML 5 support? Like older versions of Firefox, Safari, Chrome, etc?

推荐答案

以单独包括,因为Modernizr包含它:

You don't need to separately include html5shiv, because Modernizr includes it:

仅适用于Internet Explorer。

It's only for Internet Explorer.

其他浏览器的旧版本不需要它:

Older versions of other browsers don't need it: http://caniuse.com/html5semantic

包含它的推荐代码片段是:

And the recommended snippet to include it is:

<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

只有IE小于9才能运行。

Which will only ever run for IE less than 9.

这篇关于如果我已经使用Modernizr,我会甚至需要HTML5 Shiv?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-18 08:01