我的网站有 HTML5、Css3 和 Jquery,它在 IE9 中看起来不错,但在 IE8 中看起来不太好
我在这里阅读了所有解决方案,并使用了所有方法 比如
CSS3 饼图
ie7-js
-
<link rel="stylesheet" href="normal.css" type="text/css" />
<!--[if lt IE 9]><link rel="stylesheet" type="text/css" href="ie8.css"><![endif]-->
<!--[if lt IE 8]><link rel="stylesheet" type="text/css" href="ie7.css"><![endif]-->
-
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js">
</script><![endif]-->
<script>
document.createElement('header');
document.createElement('nav');
document.createElement('hgroup');
document.createElement('section');
document.createElement('article');
document.createElement('aside');
document.createElement('footer');
</script>
和....和....
我找不到在 IE8 中正常显示网站的最佳方式
请帮忙。
最佳答案
我不推荐 css3pie,它会导致一些副作用。
对于 html5 元素的样式问题,您正确地使用了 shim/shiv(如 html5shiv ),因此您不需要 document.createElement
部分。这将解决大部分问题。
我不会为 IE 创建自定义 CSS 样式表,而是切换到 conditional comments , 这样你就可以在主 CSS 中添加特定的 ie 规则:
.ie #specificdiv { /* custom rule for ie */ }
当您的元素变大时,您将不必浏览所有不同的工作表。
然后 ie9.js ,这是针对旧版 IE 不支持的 css 选择器(如 :not
)。
您还剩下 css3 属性。对于这些,恐怕你必须一个一个地搜索 fallbacks/polyfills。以下是一些可以作为起点的有用资源:
关于html - 使用 HTML5 和 Css3 解决 IE8 问题的最佳解决方案是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13138759/