• 存一些有用的CSS


    reset

    body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0}
    table{border-collapse:collapse;border-spacing:0}
    fieldset,img{border:0}
    address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal}
    ol,ul{list-style:none}
    caption,th{text-align:left}
    h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}
    q:before,q:after{content:''}
    abbr,acronym{border:0;font-variant:normal}
    sup{vertical-align:text-top}
    sub{vertical-align:text-bottom}
    input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit}
    input,textarea,select{*font-size:100%}
    *{font-family: "Microsoft Yahei"}
    a{text-decoration: none;color: #000}

    clearfix

    .clearfix:after{
        content:".";
        display:block;
        height:0;
        clear:both;
        visibility:hidden
    }
    .clearfix{
        *+height:1%;
    }

    css hack

    hack 写法 IE6(S) IE6(Q) IE7(S) IE7(Q) IE8(S) IE8(Q) IE9(S) IE9(Q) IE10(S) IE10(Q)
    * *color Y Y Y Y N Y N Y N Y
    + +color Y Y Y Y N Y N Y N Y
    - -color Y Y N N N N N N N N
    _ _color Y Y N Y N Y N Y N N
    # #color Y Y Y Y N Y N Y N Y
    \0 color:red\0 N N N N Y N Y N Y N
    \9\0 color:red\9\0 N N N N N N Y N Y N
    !important color:blue !important;color:green; N N Y N Y N Y N Y Y
    *html *前缀只对IE6生效
    *+html *+前缀只对IE7生效
    @media screen\9{...}只对IE6/7生效
    @media \0screen {body { background: red; }}只对IE8有效
    @media \0screen\,screen\9{body { background: blue; }}只对IE6/7/8有效
    @media screen\0 {body { background: green; }} 只对IE8/9/10有效
    @media screen and (min-0\0) {body { background: gray; }} 只对IE9/10有效
    @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {body { background: orange; }} 只对IE10有效
  • 相关阅读:
    TXLSReadWriteII 公式计算
    Delphi TXLSReadWriteII2 带的demo中直接编辑XLS文件的例子
    delphi图片欣赏
    SQL 读取csv 文件批量插入数据
    Delphi TXLSReadWriteII 导出EXCEL
    Rollup 与 webpack的区别
    ref 属性使用eslint报错
    内容超出省略实现
    mac 环境配置
    前端学习资料整理
  • 原文地址:https://www.cnblogs.com/rizzle/p/4691833.html
Copyright © 2020-2023  润新知