html5 for IE8 or less

前端 未结 5 2123
野的像风
野的像风 2021-01-16 07:00

I re-build my website with HTML5 tags

Its working fine with FF,Chorme, and IE9

Its not working with IE8 or less.

Do you know if there are any accentu

相关标签:
5条回答
  • 2021-01-16 07:51

    Use HTML5 Shiv to add compatibility back to older browsers.

    http://code.google.com/p/html5shiv/

    0 讨论(0)
  • 2021-01-16 07:51

    IE8 and before don't recognize all HTML5 elements. You can trick the browsers into recornising them using Javascript. You can also add a default styling if you wish.

    This tutorial shows you how: http://www.communitymx.com/content/article.cfm?cid=8C170

    Note that Javascript is required to fix this. If Javascript is disabled, which is quite often the case with IE6 and IE7 users, you won't be able to get it to work. However, do not worry too much. IE6 is dead and IE7 and IE8 should be by now. These are old browsers.

    0 讨论(0)
  • add the below code in head section,

    <meta http-equiv="X-UA-Compatible" content="IE=8" />
    <!--[if lt IE 9]>
    <script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE8.js"></script>
    <![endif]-->
    <script src="html5shiv.js"></script>
    

    you can download html5shiv from http://code.google.com/p/html5shiv/

    0 讨论(0)
  • 2021-01-16 08:02

    Try following line in head

    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    
    0 讨论(0)
  • 2021-01-16 08:04

    Add this javascript to your site and it should work fine in IE 6, 7 and 8 https://github.com/aFarkas/html5shiv

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