zoukankan      html  css  js  c++  java
  • CSS Hank兼容浏览器的

    color:red; /* 所有浏览器都支持 */
    color:red !important; /* 除IE6外 */
    _color:red; /* IE6支持 */
    *color:red; /* IE6、IE7支持 */
    +color:red; /*IE7支持*/
    *+color:red; /* IE7支持 */
    color:red9; /* IE6、IE7、IE8、IE9支持 */
    color:red; /* 针对所有IE */
    color:red; /* IE8、IE9支持 */
    color:red9; /*IE9支持*/
    :root .test { color:red; }  /*IE9支持*/
    /* webkit and opera */
    @media all and (min- 0px){ div{color:red;} }
    /* webkit */
    @media screen and (-webkit-min-device-pixel-ratio:0){ div{color:red;} }
    /* opera */
    @media all and (-webkit-min-device-pixel-ratio:10000), not all and (-webkit-min-device-pixel-ratio:0) { div{color:red;} }
    /* firefox * /
    @-moz-document url-prefix(){ div{color:red;} } /* all firefox */
    html>/**/body div, x:-moz-any-link, x:default {color:red;} /* newest firefox */
    body:nth-of-type(1) p{color:red;} /* Chrome、Safari支持 */


    <!--[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> <!--<![endif]-->
    <!-[if IE 7]> = 等于 IE7
    <!-[if lt IE 8]> = 小于 IE8(就是 IE7 或以下了啦)
    <!-[if gte IE 8]> = 大于或等于 IE8
    <meta http-equiv="x-ua-compatible" content="ie=7" />
    把这段代码放到<head>里面,在ie8里面的页面解析起来就跟ie7一模一样的了
    <!-[if IE]>
    <link rel="stylesheet" href="/ie-all.css" type="text/css" media="screen" />
    <![endif]->
    <!-[if lt IE 8]>
    <link rel="stylesheet" href="/ie.css" type="text/css" media="screen" />
    <![endif]->
    <!-[if IE 7]>
    <link rel="stylesheet" href="/ie7.css" type="text/css" media="screen" />
    <![endif]->
    <!-[if IE 6]>
    <link rel="stylesheet" href="/ie6.css" type="text/css" media="screen" />
    <![endif]->



  • 相关阅读:
    爬虫学习——网页解释器简介
    爬虫学习——urllib2三种方法的实例
    JSLint在idea编译器中报错
    elasticsearch学习之根据发布时间设置衰减函数
    通过Function Score Query优化Elasticsearch搜索结果(综合排序)
    Java中List, Integer[], int[]的相互转换
    CentOS7查看和关闭防火墙
    Elasticsearch 自定义多个分析器
    利用grep-console插件使Intellij idea显示多颜色调试日志
    为ElasticSearch添加HTTP基本认证
  • 原文地址:https://www.cnblogs.com/zhouzme/p/5758555.html
Copyright © 2011-2022 走看看