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

  • 相关阅读:
    Docker,用任何工具链和任何语言来构建任何应用
    从Docker在Linux和Windows下的区别简单理解Docker的层次结构
    Docker在Windows下的安装以及Hello World
    (译)学习如何构建自动化、跨浏览器的JavaScript单元测试
    由Python的super()函数想到的
    PS:蓝天白云的制作
    PS:缝线颜色随着鞋帮颜色的改变发生改变.files
    Windows8 64位运行Silverlight程序不能访问WCF的解决方案
    背景图片之background的用法
    12306订票助手更新
  • 原文地址:https://www.cnblogs.com/wang715100018066/p/6264579.html
Copyright © 2020-2023  润新知