我试图制作我在html5中所做的网页工作在ie8,但它看起来到处都是。
它完美适用于ie9 +,chrome和firefox。
我尝试在css之前的head部分添加html5.js,但它仍无法正常工作
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
网页供您测试:
答案 0 :(得分:3)
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
你在https:并且shim / shiv是http:所以删除http:
答案 1 :(得分:0)
检查IE8是否支持您希望使用此链接实现的HTML5元素:HTML5 Support
IE8已经过时了,而且它肯定不支持大多数HTML5元素(用IE8替代IE9中的IE9)。
答案 2 :(得分:-1)
<!--[if lt IE 9]>
<script>
document.createElement('header');
document.createElement('nav');
document.createElement('section');
document.createElement('article');
document.createElement('aside');
document.createElement('footer');
</script>
<![endif]-->