HTML5 Shiv-let the damn IE series support HTML5, shivhtml5

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.