欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

bootstrap IE8 兼容性處理

 更新時(shí)間:2017年03月22日 08:36:55   投稿:lijiao  
這篇文章主要為大家詳細(xì)介紹了bootstrap IE8 兼容性處理,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下

bootstrap IE8 兼容性處理

<!DOCTYPE html>
<html lang="zh-CN">

  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Bootstrap IE8兼容性</title>
    <link href="css/bootstrap.min.css" rel="external nofollow" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="css/font-awesome.min.css" rel="external nofollow" />
    
    <!--[if lt IE 9]>
       <script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
       <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    
  </head>

  <body>
    <div class="container">
      <div class="row">
        <div class="col-sm-6" style="border: 1px solid red;">
          左側(cè)
        </div>
        <div class="col-sm-6" style="border: 1px solid green;">
          右側(cè)
        </div>
      </div>
    </div>
  </body>

</html>

針對(duì) IE8 仍然需要額外引入 Respond.js 文件以支持媒體查詢(media query)。

1、http協(xié)議下效果(如:http://192.168.12.40:8020/bootstrap/index.html):

2、file文件協(xié)議IE8下效果(如:C:\Users\dell\Documents\HBuilderProject\bootstrap\index.html)

如上圖所示,已經(jīng)不支持柵格布局。

主要存在的問題是:

Respond.js 與 file:// 協(xié)議

由于瀏覽器的安全機(jī)制,Respond.js 不能在通過 file:// 協(xié)議(打開本地HTML文件所用的協(xié)議)訪問的頁面上發(fā)揮正常的功能。如果需要測(cè)試 IE8 下面的響應(yīng)式特性,務(wù)必通過 http 協(xié)議訪問頁面(例如搭建 apache、nginx 等)。

以上就是本文的全部內(nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

最新評(píng)論