Let ie Support the implementation of html5 labels, iehtml5
Html5 has been popular for a long time. If you don't study html5 + css3, you can't go over it. Let's start with the most basic introduction today, so that the older generation of the ie family can understand the new html5 labels. Frontend Resource Sharing
1. Add code to the page
. Code
- <! -- [If lt IE 9]>
- <Script src = "http://html5shim.googlecode.com/svn/trunk/html5.js"> </script>
- <! [Endif] -->
2. Define the CSS code (Important)
. Code
- Article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {display: block ;}
The original content of this js file is very small, and the amount of version code updated may increase now. I did not elaborate on the specific differences and posted the original code. It should still be usable. Frontend Resource Sharing
. Code
- (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]) }}) ()
If you want. You can directly put it in the page. However, pay attention to the second step. Define the display: block attribute for the html5 tag.
How is HTML5 browser compatibility? Suitable for website development?
At present, most websites have gradually tried to use HTML5 for reconstruction, but most of them are still using new HTML5 semantic tags. For earlier ie browsers, it is easy to be compatible with new HTML5 labels.
The new attributes of HTML5 are usually used in the new attributes + js compatibility method.
There are almost no large websites in China for special new functional tags, such as video, audio, and canvas.
Most mobile terminals are webkit kernels, so you can safely use HTML5.
In China, it will take at least five years for you to use HTML5 when modern browsers become popular. IE6 will be extinct in about one year, and IE8 will not become extinct in a short time.
We recommend that you consider HTML5 + compatibility assistance, so that modern browsers can display cool effects. The old browsers can ensure normal business, not necessarily the same as the HTML5 version, as long as the most basic skills are available.
How to make the browser support HTML5
We cannot allow browsers to support html5.
Only html5-supported browser versions can be downloaded.
Including the latest version of browsers
Chrome firefox safari ......
Some browsers are trying to support html5, such
Travel 3 opera