HTML5 can do a lot of things for us, the most delicious is the application of semantic tags, if you have been in chrome or other support HTML5 browser to use it, then this article will certainly be useful to you, because now you can also use the Internet Explorer HTML5.
Okay, all right! Today's topic is:html5shiv-master
Here are the html5.js files that quote Google, and the benefits are not:
<!--[if ie]> <script src= "Http://html5shiv.googlecode.com/svn/trunk/html5.js" ></script> < ! [endif]-->
Copy the code to the Head section, and remember that the head section must be (because IE has to know the element before parsing the element, so the JS file cannot be called elsewhere, otherwise it will fail)
Of course, you can also take the code out of your own eyes:
(function () {if (!/*@[email protected]*/0) Return;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 (' , '), I=e.length;while (i--) {document.createelement (e[i])}) ()
Finally add this paragraph to the CSS:
/*html5*/Article,aside,dialog,footer,header,section,footer,nav,figure,menu{display:block}
The main thing is to make these HTML5 tags into chunks, like Div.
OK, simple, a word summed up is: reference html5.js make HTML5 tag into chunks
Let IE support HTML5