If I'm already using Modernizr, will I then even need HTML5 Shiv?

前端 未结 1 747
我寻月下人不归
我寻月下人不归 2021-01-31 08:09

1) If I\'m already using Modernizr, will I then even need HTML5 Shiv to enable HTML5 tag support for IE?

2) Is HTML5 Shiv only for IE, or for all browser who don\'t have

相关标签:
1条回答
  • 2021-01-31 08:22

    1) If I'm already using Modernizer then even will I need HTML5 Shiv to enable HTML5 tag supports for IE.

    You don't need to separately include html5shiv, because Modernizr includes it:

    As of Modernizr 1.5, this script is identical to what is used in the popular html5shim/html5shiv library.

    http://www.modernizr.com/docs/#html5inie


    2) and is HTML5 Shiv only for IE or for all browser who don't have native HTML 5 support. like older version of Firefox, Safari, Chrome etc.

    It's only for Internet Explorer.

    Older versions of other browsers don't need it: http://caniuse.com/html5semantic

    And the recommended snippet to include it is:

    <!--[if lt IE 9]>
    <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    

    Which will only ever run for IE less than 9.

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