gpt4 book ai didi

javascript - Internet Explorer 8 中的 HTML5 和 CSS3 功能

转载 作者:行者123 更新时间:2023-11-28 11:52:57 25 4
gpt4 key购买 nike

我知道 Internet Explorer 不支持 HTML5 或 CSS3。我知道有 javascript hacks 至少可以让 Internet Explorer 与新标签一起玩得很好,比如:

<nav>, <header>, <footer>, <article>, <aside>, and <section> 

<script>
document.createElement('header');
document.createElement('section');
document.createElement('article');
document.createElement('aside');
document.createElement('nav');
document.createElement('footer');
</script>

使用 http://html5shim.googlecode.com/svn/trunk/html5.js

我知道对于 IE 8,可以使用一些 CSS 来制作圆 Angular 。

我想使用 D3 Javascript 库来可视化连接(具体请参阅此演示:http://mbostock.github.io/d3/talk/20111116/pack-hierarchy.html)

所以我的问题是:使用 IE8 和一些已知的 hack 是否可以使演示工作?是否有任何黑客可以使这变得简单可行?

预先感谢您的回答。

最佳答案

简答:否

长答案:HTML5shim 并不是真正的 hack,而是更多的默认样式和规则的集合,可以将语义 HTML(可以是任何东西)转换成在浏览器上看起来像实际上知道什么的东西 <header>意味着。

CSS 圆 Angular 是特定的 IE8 实现,与 CSS3 无关/很少/

它不添加对 Canvas、SVG 或 CSS3 等 IE8 缺乏的支持。

D3 本身不支持IE8。来自 D3 wiki:

D3 supports so-called “modern” browsers, which generally means everything except IE8 and below. D3 is tested against Firefox, Chrome (Chromium), Safari (WebKit), Opera and IE9. Parts of D3 may work in older browsers, as the core D3 library has minimal requirements: JavaScript and the W3C DOM API. For IE8, the compatibility library Aight is recommended. D3 uses the Selectors API Level 1, but you can preload Sizzle for compatibility. You'll need a modern browser to use SVG and CSS3 Transitions. D3 is not a compatibility layer, so if your browser doesn't support standards, you're out of luck. Sorry!

在这一点上,你得问问自己是否有支持 IE8 的具体原因? IE8 现在比最新的 IE 版本落后 4 个版本,大约有 4 年半的历史。您是否受到某些陈旧的网络政策的限制?

关于javascript - Internet Explorer 8 中的 HTML5 和 CSS3 功能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20223363/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com