header/footer/nav tags - what happens to these in IE7, IE8 and browsers than don't support HTML5?

后端 未结 2 945
北荒
北荒 2020-11-30 19:39

I am eager to start using Html5 in particular the

/
/
/
相关标签:
2条回答
  • 2020-11-30 19:54

    Place this is the <head> section of your page, before any CSS files are loaded.

    <!--[if lte IE 8]>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
    <![endif]-->
    

    html5shi(m|v) creates doc elements for all the html5 elements so the styles from your CSS can kick in. Default behaviour for IE is to ignore unknown elements. For more info see resig's blog post.

    0 讨论(0)
  • 2020-11-30 19:57

    Yes, IE<9 will ignore any HTML5 elements (reason #3162 no one should ever have used IE) but there are javascript solutions for that which my groggy mind can't think of this morning. I'm sure others will post those solutions below. :)

    First is the html5 shiv

    0 讨论(0)
提交回复
热议问题