Modernizr的VS HTML希夫 [英] Modernizr vs HTML shiv

查看:77
本文介绍了Modernizr的VS HTML希夫的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我只需要旧的浏览器认识到HTML5的标签,这是我应该使用, Modernizr的或流行的 HTML5希夫
而且,如果我不需要这种风格HTML5标记,我需要的浏览器反正认出来?或添加CSS这些标签时,它是只需要?

If I ONLY need older browsers to recognize HTML5 tags, which should I use, Modernizr or the popular HTML5 shiv? And also, if I don't need to style this HTML5 tags, do I need the browsers to recognize them anyways? Or is it only necessary when adding CSS to these tags?

谢谢!

推荐答案

html5shiv基本上可以让IE浏览器能够识别和风格的HTML5元素,而Modernizr的提供由broswer支持的相同Plus功能检测。

html5shiv basically allows IE to recognize and style HTML5 elements, while Modernizr provides the same plus feature detection supported by a broswer.

因此​​,要回答你的问题HTML5希夫应足以识别IE HTML5标签。 (注意我说的IE浏览器在这里,因为这是在html5shiv目标,不知道你是什么意思时,你说老的浏览器)

So to answer your question HTML5 shiv should be sufficient to recognize HTML5 tags in IE. (note I say IE here since that is what the html5shiv targets, not sure what you mean when you say older browsers)

有关的第二部分,即使你不想要的样式HTML5标记,我会建议使用毒刃,因为浏览器既可以正确显示它们,或者根本没有,所以最好是安全的。

For the second part, even if you don't want to style the HTML5 tags, I would advice to use the shiv since the browser may either display them incorrectly, or not at all, so it is better to be safe.

这篇关于Modernizr的VS HTML希夫的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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