我知道这两个脚本库的网站上有很多好的问题。

我想问一下我似乎无法找到的东西。

modernizr 提供 html5shiv 并不从框中出来,即,只是包括脚本。

我知道html5shiv“只是”修复了IE <9的HTML5元素,它是否有支持停止?

Modernizr在IE导航器上修复CSS3问题吗?IE9.js做到了吗?(并且我的意思是出于框中的这个特殊问题,没有额外的js代码来处理角落案例)

除了包括脚本之外,您考虑到使用库时,现代化的优势是什么是HTML5Shiv?

有帮助吗?

解决方案

They do different things.

Modernizr detects the availability of features in a page allowing you to provide your own polyfills for older browsers should you require that functionality. You can add support for <canvas> using a canvas tag polyfill so that canvas functionality, including it's JavaScript interface, in browsers that don't support the <canvas> tag.

Html5shiv adds the new html5 tags that aren't available (<section>, <header>, etc) to older browsers. It also creates the default styles (display: block for <section> for example).

That's it. It provides no other functionality.

其他提示

Modernizr 1.5+ actually includes HTML5Shiv, so if you use it, shiv is redundant. Source: http://modernizr.com/docs/#html5inie

"As of Modernizr 1.5, this script is identical to what is used in the popular html5shim/html5shiv library."

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top