【问题标题】:what is the best solution to solve the Issue in IE8 with HTML5 and Css3用 HTML5 和 Css3 解决 IE8 中的问题的最佳解决方案是什么
【发布时间】:2012-10-30 20:58:57
【问题描述】:

我有网站 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 中显示网站的最佳方式

任何帮助请。

网站:moic-egypt.com

【问题讨论】:

    标签: html css internet-explorer-8


    【解决方案1】:

    我不会推荐 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 属性。对于这些,恐怕您将不得不一一搜索后备/ polyfill。以下是一些不错的资源:

    【讨论】: