引用Google的html5.js文件
<!--[
if IE]>
<script src=”http:
//html5shiv.googlecode.com/svn/trunk/html5.js”></script>
< ![endif]-->
View Code
将上代码复制到head部分,记住一定要是head部分(因为IE必须在元素解析前知道这个元素,所以这个js文件不能在其他位置调用,否则失效)
最后在css里面加上这段:
/*html5*/
article,aside,dialog,footer,header,section,footer,nav,figure,menu{display:block}
主要是让这些html5标签成块状,像div那样。
好了,简单吧,一句话概括就是:引用html5.js 使html5标签成块状
转载于:https://www.cnblogs.com/xbcq/p/4172791.html
相关资源:JAVA上百实例源码以及开源项目