zoukankan      html  css  js  c++  java
  • bootstrap兼容IE

    这种响应式的布局正是通过CSS3的媒体查询(Media Query)功能实现的,根据不同的分辨率来匹配不同的样式。IE8浏览器并不支持这一优秀的Css3特性,Bootstrap在开发文档中写了如何使用进行兼容IE8,如果想兼容IE6,IE7,可以搜索bsie (bootstrap2)。

    http://v2.bootcss.com

    1,注意,使用bootstrap最好使用2.0以下的jquery;

    2,ie8以下不支持placeholder

    <script type="text/javascript" src="js/bootstrap/jquery.placeholder.js"></script>
    <script type="text/javascript">
        $(function () {
            $('input, textarea').placeholder();
        });
    </script>

    总结:

    <!DOCTYPE html>
    <html lang="zh-CN">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
        <meta name="author" content="zhy" />
        <title>ie8</title>
        <link rel="stylesheet" href="css/bootstrap/bootstrap.min.css">
        <!--[if lte IE 9]>
        <script src=js/bootstrap/respond.min.js"></script>
        <script src=js/bootstrap/html5shiv.min.js"></script>
        <![endif]-->
        <script src="js/bootstrap/jquery-1.12.0.min.js"></script>
        <script src="js/bootstrap/bootstrap.min.js"></script>
    </head>
    <body>
    </body>
    </html>

    IE判断IE版本的语句:

    <!--[if lte IE 6]>
    <![endif]-->
    IE6及其以下版本可见
    
    <!--[if lte IE 7]>
    <![endif]-->
    IE7及其以下版本可见
    
    <!--[if IE 6]>
    <![endif]-->
    只有IE6版本可见
    
    <![if !IE]>
    <![endif]>
    除了IE以外的版本
    
    <!--[if lt IE 8]>
    <![endif]-->
    IE8以下的版本可见
    
    <!--[if gte IE 7]>
    <![endif]-->
    IE7及大于IE7的版本可见

    lte:就是Less than or equal to的简写,也就是小于或等于的意思。 
    lt : 就是Less than的简写,也就是小于的意思。 
    gte: 就是Greater than or equal to的简写,也就是大于或等于的意思。 
    gt : 就是Greater than的简写,也就是大于的意思。 
    ! :  就是不等于的意思,跟javascript里的不等于判断符相同

  • 相关阅读:
    linux下利用valgrind工具进行内存泄露检测和性能分析
    Linux下内存泄漏工具
    linux下将不同线程绑定到不同core和cpu上——pthread_setaffinity_np
    Linux下getopt()函数
    SparkStreaming+Kafka整合
    Hive+Sqoop+Mysql整合
    crontab
    Hive与Hbase整合
    关系数据库数据与hadoop数据进行转换的工具
    Flume+Kafka+Storm+Hbase+HDSF+Poi整合
  • 原文地址:https://www.cnblogs.com/wang715100018066/p/6264579.html
Copyright © 2011-2022 走看看