方式一:引入Google的HTML5.js线上文件
1 <!–[if lt IE9]> 2 <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> 3 <![endif]–>
方式二:自定义
1 <script> 2 (function() { 3 if (! 4 /*@cc_on!@*/ 5 0) return; 6 var e = "abbr, article, aside, audio, canvas, datalist, details, dialog, eventsource, figure, footer, header, hgroup, mark, menu, meter, nav, output, progress, section, time, video".split(', '); 7 var i= e.length; 8 while (i--){ 9 document.createElement(e[i]) 10 } 11 })() 12 </script>
自定义方式同时CSS需定义如下:
1 article,aside,dialog,footer,header,section,footer,nav,figure,menu{display:block}