zoukankan      html  css  js  c++  java
  • 【CSS】之hack

    <!DOCTYPE HTML>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <meta name="keywords" content="keywords in here">
        <meta name="description" content="Description in here">
        <meta property="og:title" content="title">
        <meta property="og:description" content="Description in here">
        <title>Hack</title>
        <style>
            #doc{
                width:300px;
                height:300px;
    
                background-color:blue;                    /*firefox*/
                background-color:red9;                    /*all IE*/
                background-color:yellow;                /*IE8*/
                *background-color:pink;                    /*IE7 +也能区分IE7和其他浏览器*/
                _background-color:orange;                /*IE6 区分IE6还可以用!important*/
            }
            :root #doc { background-color:purple9; }    /*IE9*/
            @media all and (min-0px){ #doc {background-color:black;} }                        /*opera,无效,跟Chrome一样的引擎,所以颜色也一样*/
            @media screen and (-webkit-min-device-pixel-ratio:0){ #doc {background-color:gray;} }    /*chrome and safari*/
        </style> 
    </head>
    <body>
        <div id="doc">
            <!-- Document Content Start -->
    
            <!-- Document Content End   -->
        </div>
    </body>
    </html>
  • 相关阅读:
    打造自定义 eslint
    二叉树(三): 二叉查找树
    二叉树(二): 补充
    二叉树(一): 遍历
    redux 源码浅析
    react-redux 源码浅析
    WebComponents使用以及思考
    SHELL 语法以及实例
    React-Native 原生 APP 更新
    关于 cdn 在项目中的使用
  • 原文地址:https://www.cnblogs.com/maomaoroc/p/3524683.html
Copyright © 2011-2022 走看看