您的位置:首页 > Web前端 > HTML5

IE8兼容html5,css3

2017-05-03 16:22 218 查看


                  IE8支持html5、css3标准模版

1、头部

<meta charset="utf-8">

    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0" />

    <meta name="apple-mobile-web-app-capable" content="yes" />

    <meta name="apple-mobile-web-app-status-bar-style" content="black" />

    <meta name="format-detection" content="telephone=no, email=no" />
   
            

2、引入

<!--[if lt IE 9]>

      <script src="html5shiv.min.js"></script>

      <script src="respond.min.js"></script>

    <![endif]-->

html5shiv.min.js和[b]respond.min.js可以直接在网上下载也可以直接用这个线上的:[/b]

[b]<!--[if lt IE 9]>
<script src="https://cdn.bootcss.com/html5shiv/r29/html5.min.js"></script>
<script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>

<![endif]-->
[/b]



重点: 1、第二步一定要放在css文件后面

   2、需要启动本地服务器(localhost),不能使用普通本地的url地址(file://开头)

研究半天才发现用file打开的,没有一点用,所以千万要小心
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  IE兼容性 html5 css3 ie 8