Because IE6/IE7/IE8 also has a large part of the user, in order to allow the website visitor to have the normal visit HTML5 website, the solution has the following two:
1. Create more than a set of templates for the site, through the program of User-agent to different browser users to display different pages, such maintenance costs are relatively high, but also lost the meaning of responsive design.
2. Use JavaScript to enable browsers that do not support HTML5 to support HTML tags. This is the way most Web sites are currently used (BOOTCSS official example).
Principle: The Script document.createelement ("") is used to create the corresponding script, and the CSS selector is applied to the label correctly. Use: Given that IE9 is supported for HTML5, add a script reference directly to the head tag of the HTML page:
<!--[if LT IE 9]><script src= "Http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js" ></script> <! [endif]->
<!--[If Lt IE 9]> <scriptsrc= "Http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js" ></script> <! [endif]-> |
Official Address: Http://code.google.com/p/html5shiv/GitHub Project address: Https://github.com/aFarkas/html5shiv
Html5shiv: an issue that resolves IE9 the following versions of browsers do not recognize HTML5 new tags and cause CSS to not work