Internet Explorer 8 是否支持 HTML 5?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/289225/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-28 22:43:34  来源:igfitidea点击:

Does Internet Explorer 8 support HTML 5?

internet-explorerinternet-explorer-8html

提问by BuddyJoe

Is there any HTML5 support in IE8? Is it on the IE8 roadmap?

IE8 中是否有任何 HTML5 支持?它在 IE8 路线图上吗?

采纳答案by hsivonen

IE8 beta 2 supports two APIs from HTML5: cross-document messagingand non-SQL storage.

IE8 beta 2 支持来自 HTML5 的两个 API:跨文档消息传递非 SQL 存储

IE8 beta 2 doesn't implement the HTML5 parsing algorithm or the new elements (no <canvas>or <video>support).

IE8 beta 2 不实现 HTML5 解析算法或新元素(不支持<canvas>或不<video>支持)。

There are also bug fixes that align IE8 better with HTML5.

还有一些错误修复可以更好地使 IE8 与 HTML5 保持一致。

回答by goker.cebeci

You can get HTML5 tags working in IE8 by including this JavaScript in the head.

您可以通过在头部包含此 JavaScript 来使 HTML5 标签在 IE8 中工作。

<script type="text/javascript">
 document.createElement('header');
 document.createElement('nav');
 document.createElement('menu');
 document.createElement('section');
 document.createElement('article');
 document.createElement('aside');
 document.createElement('footer');
</script>

回答by John

You can use this IE HTML5 shim scriptto gain a basic level of support for the new semantic elements in HTML5 such as <article>.

您可以使用这个 IE HTML5 shim 脚本来获得对 HTML5 中新语义元素的基本支持,例如<article>.

回答by Simon

Modernizris also a great option for giving IE HTML5 rendering capabilities.

Modernizr也是提供 IE HTML5 渲染功能的绝佳选择。

回答by Justin

Does it support

是否支持

<!DOCTYPE html>

Yes it does.

是的,它确实。

Perhaps a better question is what modern web features IE8 supports. Some of the best places to answer that are caniuse.com, html5test.com, and browserscope.org.

也许更好的问题是 IE8 支持哪些现代 Web 功能。一些最好的回答地点是caniuse.comhtml5test.combrowserscope.org

HTML5 means a lot of different things to different people. These days, it means HTML, CSS, and JavaScript functionality. The term is becoming a bit "Web 2.0"-like.

HTML5 对不同的人意味着很多不同的东西。如今,它意味着 HTML、CSS 和 JavaScript 功能。这个术语变得有点像“Web 2.0”。

回答by Martin Hassman

回答by Anonymous

IE8's HTML5 support is limited, but Internet Explorer 9has just been released and has strongsupport for the new emerging HTML5 technologies.

IE8 对 HTML5 的支持有限,但Internet Explorer 9刚刚发布,对新兴的 HTML5 技术有很强的支持。

回答by Aaron

HTML5 is still in draft spec (and will be for a loooong time). Why bother?

HTML5 仍处于草案规范中(并且将持续很长时间)。何苦?

回答by dpan

Check out the caniuseguide for all HTML 5 features across all browsers and versions, including future versions.

查看caniuse指南,了解所有浏览器和版本(包括未来版本)的所有 HTML 5 功能。

回答by Alfonse

You can use this to make IE8 understand/support basic HTML5 tags.

您可以使用它使 IE8 理解/支持基本的 HTML5 标签。

<!--[if lt IE 9 ]> 
    <script type="text/javascript">
        var html5Elem = ['header', 'nav', 'menu', 'section', 'article', 'aside', 'footer'];
        for (var i = 0; i < html5Elem.length; i++){
            document.createElement(html5Elem[i]);
        }
    </script>
<![endif]-->