如何让IE识别HTML 5标签? [英] How can I make IE recognize HTML 5 tags?

查看:138
本文介绍了如何让IE识别HTML 5标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使我的HTML 5页面与IE兼容(至少IE 7和8)有哪些好的解决方案?

What are some good solutions for making my HTML 5 pages compatible with IE (at least IE 7 & 8)?

我是否有行业标准使用这将使IE识别像< article> < nav>

Is there an industry standard that I can use that will make IE recognize things like <article> and <nav>?

推荐答案

是的,你可以运行 html5shiv 如果你想要,这就是你所指的。它将允许IE最初解析标签。但是如果你想使用 innerHTML (或基于它的框架代码),那仍然会给你带来同样的问题。有 innershiv ,但效率并不高,并不适用于所有顶级元素。

Yeah, you can run the html5shiv if you want, which is what you seem to be referring to. It'll allow IE to parse the tags initially. But that will still leave you with the same problems if you want to use innerHTML (or framework code based on it). There's the innershiv, but it's not wonderfully efficient and it won't work for all top-level elements.

你想通过使用像< article> ?您将承担额外的浏览器问题,实际上没什么好处。说实话,我今天真的不会打扰。这是未来的事情。

What do you want to achieve by using the semantic-but-behaviour-free elements like <article>? You will be taking on extra browser problems for little practical benefit. To be honest, I really wouldn't bother, today. It's something for the future.

这篇关于如何让IE识别HTML 5标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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