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里的不等于判断符相同

  • 相关阅读:
    简体中文和繁体中文的转换
    EasyPoi 快速Office 开发
    玩转SpringBoot之定时任务详解
    Spring Boot中使用Swagger2构建强大的RESTful API文档
    一篇文章带你搞懂 SpringBoot与Swagger整合
    JAVA团队开发手册
    CentOS(6、7)修改主机名(hostname)
    SpringBoot多环境部署,在启动时动态设置相应的配置文件
    MyBatis逆向工程代码的生成以及使用详解(持续更新)
    MySQL写入插入数据优化配置
  • 原文地址:https://www.cnblogs.com/wang715100018066/p/6264579.html
Copyright © 2011-2022 走看看