HTML5 Shiv-let the damn IE series support HTML5, shivhtml5
HTML5 can do a lot for us. The most delicious thing is the semantic tag application. If you have used it in Chrome or other HTML5-supported browsers, this article will be useful to you, because now you can also use HTML5 on IE.
Okay! The topic of the big front-end today is: HTML5 Shiv
The following is a reference to Google's html5.js file, so the benefits will not be mentioned:
<!--[if IE]><script src=”http://html5shiv.googlecode.com/svn/trunk/html5.js”></script>< ![endif]-->
Copy the above Code to the head part. Remember to use the head part.(Because IE must know this element before parsing the element, this js file cannot be called elsewhere, otherwise it becomes invalid)
Of course, you can also take out the code and do it yourself:
(function(){if(!/*@cc_on!@*/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])}})()
Add this section in css:
/*html5*/article,aside,dialog,footer,header,section,footer,nav,figure,menu{display:block}
These html5 labels are mainly made into blocks, like div.
Okay, let's just put it simply: Reference html5.js to make html5 labels into blocks.