html5 semantic labels and compatibility processing method

1.html5 in new semantic tags:

artical footer header nav section aside 

2. does not support more new in IE8 and IE8 browser the following semantic tags

3. Solution

Scheme 1: dynamically created label before the browser parses the element, and then transferred into a block-level element

E.g:

document.createdElement("header")

 

Scenario 2: Creating a dynamic element by introducing html5shiv.js plug

<! - less ie 8 only be cited packet for compatibility html5 semantic tag -> 
<! - [IF LTE IEs. 8]> 
<Script the src = "./ html5shiv.js"> </ Script> 
<! [endif] ->

 

Guess you like

Origin www.cnblogs.com/zhaodz/p/11519671.html