html 5 tag not supporting on below ie9?

前端 未结 4 1985
名媛妹妹
名媛妹妹 2021-01-27 03:35

i just visited apple.com and they use some html5 tag like nav. it is working in all broswer but i i try to test html5 code it is not working in ie8 and ie7. i am not getting wha

4条回答
  •  遇见更好的自我
    2021-01-27 04:32

    older versions of IE don't treat the new HTML5 elements like header, nav, article, footer, address as "unknown" elements.

    You can simply introduce the new elements to the old IE family members by using a simple JavaScript approach:

    document.createElement("article");  
    document.createElement("footer");  
    document.createElement("header");  
    document.createElement("hgroup");  
    document.createElement("nav");
    

    Check out the article HTML5 Shiv and e.g. the modernizr framewoerk

    HTH,

    --hennson

提交回复
热议问题