zoukankan      html  css  js  c++  java
  • CSS hack 和 IE浏览器条件判断 集中汇总

    (从死了一次又一次终于挂掉的百度空间中抢救出来的,发表日期 2014-08-16)

    未完待续

    css hack

    ie 浏览器判断语句

    360大多数网页的各浏览器兼容方法:

    <!DOCTYPE html>
    
        <!--[if lt IE 7 ]><html class="ie6"><![endif]-->
    
        <!--[if IE 7 ]><html class="ie7"><![endif]-->
    
        <!--[if IE 8 ]><html class="ie8"><![endif]-->
    
        <!--[if IE 9 ]><html class="ie9"><![endif]-->
    
        <!--[if (gt IE 9)|!(IE)]><!-->
    
    <html class="w3c"><!--<![endif]-->
    
        <head>
    
            <meta name="renderer" content = "webkit|ie-comp|ie-stand" />
    
            <meta charset="utf-8" />
    
            <meta property="wb:webmaster" content="eaa2b47c8ad0b3ee" />
    
            <title>360音乐搜索 - 搜一下,聆听更多</title>
    
            <meta content="360音乐,音乐,歌曲,MP3,网络流行,经典老歌,音乐网" name="keywords"/>
    
            <meta content="360音乐搜索聚合海量优质音源,合作……搜一下聆听更多。" name="description"/>
    
            <link rel="stylesheet" type="text/css" href="http://s7.qhimg.com/!9366d735/common.css"/>
    
            <link rel="stylesheet" type="text/css" href="http://s1.qhimg.com/!07c64081/index.css"/>
    
            <link href="http://s5.qhimg.com/!d943ef94/sobar.css" type="text/css" rel="stylesheet"/>
    
            <script src="http://s9.qhimg.com/!b8cb2dc7/sobar.js"></script>
    
        </head>
    
        <body>
    
        ……
    
        </body>
    
    </html>

    其css代码就这样写:(截取一部分)

    .b-l{
    
    bottom:0;
    
    left:0
    
    }
    
    .b-r{
    
    bottom:0;
    
    right:0
    
    }
    
    .ie6 .front-view,.ie6 .behind-view{
    
    font-size:0;
    
    line-height:0
    
    }
    
    .ie6 .front-view *,.ie6 .behind-view *{
    
    font-size:12px;
    
    line-height:1.5
    
    }
    
    .ie6 .front-view .mysite-reco .tab *{
    
    line-height:26px
    
    }
    
    .ie6 .front-view .mysite-reco .reco-list li *{
    
    font-size:14px
    
    }
    
    .ie6 .front-view .mysite-reco .reco-list li .tips-reco *{
    
    font-size:12px
    
    }
    
    .ie6 .front-view .mysite-list-null *{
    
    line-height:68px
    
    }
    
    .split{
    
    padding:0 5px 0 4px;
    
    font-size:14px;
    
    -webkit-text-size-adjust:none
    
    }
    
    .dot{
    
    display:inline-block;
    
    overflow:hidden;
    
    width:2px;
    
    height:2px;
    
    vertical-align:top;
    
    padding: 0px; font-size: 16px; font-family: 微软雅黑, Tahoma; line-height: 25.6000003814697px;">}
    
    .g-hide{
    
    display:none
    
    }
    
    .disable-hover{
    
    pointer-events:none
    
    }
  • 相关阅读:
    float对内联元素和块元素的影响
    行内元素的困扰
    Nodejs同步和异步编程
    let、const、var的区别
    作用域
    SpringMVC
    MVC2新闻编译与发布
    JSP显示新闻
    servlet应用
    SWPU邮件登录界面的仿写(第二次作业)
  • 原文地址:https://www.cnblogs.com/ferron/p/4530469.html
Copyright © 2011-2022 走看看