html - IE 7-8 Css html错误

标签 html css

http://ucuzarakip.com/Kategori/Oyuncak-Kategoriler/Ahsap-Oyuncak/15

请在 IE7 或 IE8 中查看此页面。我找不到错误在哪里。它可以在 Firefox 和 Chrome 上正常运行。

你有什么建议吗?

最佳答案

您正在使用 HTML5 元素。要使这些元素在 IE7 和 IE8 中工作,请在您的 head 标记中添加以下代码

<!--[if lt IE 9]>
  <script>
      document.createElement('header');
      document.createElement('nav');
      document.createElement('section');
      document.createElement('article');
      document.createElement('aside');
      document.createElement('footer');
      document.createElement('hgroup');
  </script>
<![endif]-->

<style type="text/css">
  header, nav, section, article, aside, footer, hgroup{ 
       display: block;
  }
</style>

(在上面的代码中删除您不使用的 HTML5 元素或添加您正在使用的元素)

Source

关于html - IE 7-8 Css html错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15001873/

相关文章:

html - Angular 4 中的动态字体文件 url 问题

ios - div 不应该在 iPhone 上的另一个 div 之上

javascript - 将 HTML 字符串转换为 DOM 元素?

java - 显示 java 对象时的 iframe 问题

javascript - 从 JavaScript 创建的按钮执行函数的正确方法?

html - 将 readHTMLTable 与多个 tbody 一起使用

javascript - 表格单元格中的内联 CSS 元素溢出

html - 将图像垂直放置在 div 中

css - img alt 更改图像尺寸

html - 我的菜单栏显示在下方我想要的位置。