zoukankan      html  css  js  c++  java
  • Eric Meyer’s CSS Reset

    html, body, div, span, applet, object, iframe,
    h1, h2, h3, h4, h5, h6, p, blockquote, pre,
    a, abbr, acronym, address, big, cite, code,
    del, dfn, em, font, img, ins, kbd, q, s, samp,
    small, strike, strong, sub, sup, tt, var,
    dl, dt, dd, ol, ul, li,
    fieldset, form, label, legend,
    table, caption, tbody, tfoot, thead, tr, th, td {
        margin: 
    0;
        padding: 
    0;
        border: 
    0;
        outline: 
    0;
        font
    -weight: inherit;
        font
    -style: inherit;
        font
    -size: 100%;
        font
    -family: inherit;
        vertical
    -align: baseline;
    }
    /* remember to define focus styles! */
    :focus {
        outline: 
    0;
    }
    body {
        line
    -height: 1;
        color: black;
        background: white;
    }
    ol, ul {
        list
    -style: none;
    }
    /* tables still need 'cellspacing="0"' in the markup */
    table {
        border
    -collapse: separate;
        border
    -spacing: 0;
    }
    caption, th, td {
        text
    -align: left;
        font
    -weight: normal;
    }
    blockquote:before, blockquote:after,
    q:before, q:after {
        content: 
    "";
    }
    blockquote, q {
        quotes: 
    "" "";
    }

    So what changed from the last iteration?

    1. I added background: transparent; to the first rule. It’s probably not as necessary as some of the other bits here, but it seemed like a good thing to add.

    2. Added a :focus rule to try to suppress link outlining. Why? So that you remember to define your own. You should make sure to define an outline, as it’s an important accessibility aid. If you have a universal default, one that applies no matter what the project, then replace my rule with your own.

    3. There’s now a body rule that sets a baseline line-height that will be inherited by the rest of the document (and can be overridden easily), and sets a foreground and background color. Originally, I avoided setting the colors, but decided it was better to put them in. Of course, if you have preferred color defaults other than black on white, edit the declarations to suit your taste.

    4. The a img, :link img, :visited img rule has been dropped. This is because the only browser family it really affects is Gecko line, and they all honor author styles as having precedent over user agent styles (as they should!). So this is already covered by the first rule.

    5. Added a rule for caption, th, td to be left-aligned and normal-weight.

    6. Added a blockquote, q rule to suppress quotes by way of the quotes property. This has the same intent as the previous rule, but approaches it along a different route.

  • 相关阅读:
    Golang (Go语言) Mac OS X下环境搭建 环境变量配置 开发工具配置 Sublime Text 2
    网站状态保存方法
    学习MVC第一课:初识MVC
    ASP.NET MVC 中动态从路由中获取URL
    ASP.NET MVC2程序开发入门到精通系列课程01
    OpenCV 里的sigma 是多少
    日期大小比较
    安装完ODAC,出现ORA12560:TNS:协议适配器错误
    Spring+IBATIS+Struts2开发流程
    【转】SSH标准配置
  • 原文地址:https://www.cnblogs.com/rere/p/1437359.html
Copyright © 2011-2022 走看看