IE8不支持媒体查询和HTML5新header、article等元素的解决方法

IE8不支持CSS媒体查询,也无法识别html5中的新元素(nav、article等)。

IE8不支持CSS媒体查询,也无法识别html5中的新元素(nav、article等),可用在head中加入如下代码解决:

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
  <script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->

 

Was this helpful?

0 / 0

发表评论 0

Your email address will not be published. Required fields are marked *