Browsers earlier than ie8 (including ie8) do not support html5 tag attribute solutions (use of the Modernizr 2.6.2 plug-in), and ie8html5

Source: Internet
Author: User

Browsers earlier than ie8 (including ie8) do not support html5 tag attribute solutions (use of the Modernizr 2.6.2 plug-in), and ie8html5



Today, I tried to use html5 tags to design a Web page. I used Firefox, and I found a very serious problem, browsers lower than ie9 cannot support html5 labels (article, aside, dialog, footer, header, section, footer, nav, figure, menu ).

I have found many ways to access the Internet. Some netizens have suggested using


<! -- [If lt IE9]>
<Script>
(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 (',');
Var I = e. length;
While (I --){
Document. createElement (e [I])
}
})()
</Script>
<! [Endif] -->


Or


<! -- [If lt IE9]>
<Script src = "http://html5shiv.googlecode.com/svn/trunk/html5.js"> </script> // Google has now withdrawn from the Chinese market (except China and North Korea ~)
<! [Endif] -->
/* Html5 */article, aside, dialog, footer, header, section, footer, nav, figure, menu {display: block}


I tried it all, but I still couldn't find it, so I was wondering, so I found a few foreign websites, and I found it was used.Modernizr plug-in, I am dead and dead doctor put into the web page, the results are not I expected to really all html5 labels can support, I use ie11 developer mode debug the ie6-ie8 is no problem, even bored, I also tested ie5 to provide perfect support.

Actually, thisModernizr plug-inMore powerful than this. If you want to know more informationClick to view.

This is a good introduction to Chinese ~After talking about this, share the plug-in,Click here to download, Directly add the <script src = "http://haiqiancun.com/file/demo/custom.modernizr.js"> </script> external link plug-in script on the head side to make your page free of worries.


Original address http://haiqiancun.com/bbs/bbsPage/0/detail/297e9e7946a599780146a5a38dde0003/1/20140812090617





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.