zoukankan      html  css  js  c++  java
  • reset.css是什么

    reset.css是什么

    一、总结

    一句话总结:

    The goal of a reset stylesheet is to reduce browser inconsistencies in things like default line heights, margins and font sizes of headings, and so on.

    二、reset.css是什么

    官网介绍:CSS Tools: Reset CSS
    https://meyerweb.com/eric/tools/css/reset/

    CSS Tools: Reset CSS

    The goal of a reset stylesheet is to reduce browser inconsistencies in things like default line heights, margins and font sizes of headings, and so on. The general reasoning behind this was discussed in a May 2007 post, if you're interested. Reset styles quite often appear in CSS frameworks, and the original "meyerweb reset" found its way into Blueprint, among others.

    The reset styles given here are intentionally very generic. There isn't any default color or background set for the body element, for example. I don't particularly recommend that you just use this in its unaltered state in your own projects. It should be tweaked, edited, extended, and otherwise tuned to match your specific reset baseline. Fill in your preferred colors for the page, links, and so on.

    In other words, this is a starting point, not a self-contained black box of no-touchiness.

    If you want to use my reset styles, then feel free! It's all explicitly in the public domain (I have to formally say that or else people ask me about licensing). You can grab a copy of the file to use and tweak as fits you best. If you're more of the copy-and-paste type, or just want an in-page preview of what you'll be getting, here it is.

    三、reset.css就是这个东东

     1 /* http://meyerweb.com/eric/tools/css/reset/ 
     2    v2.0 | 20110126
     3    License: none (public domain)
     4 */
     5 
     6 html, body, div, span, applet, object, iframe,
     7 h1, h2, h3, h4, h5, h6, p, blockquote, pre,
     8 a, abbr, acronym, address, big, cite, code,
     9 del, dfn, em, img, ins, kbd, q, s, samp,
    10 small, strike, strong, sub, sup, tt, var,
    11 b, u, i, center,
    12 dl, dt, dd, ol, ul, li,
    13 fieldset, form, label, legend,
    14 table, caption, tbody, tfoot, thead, tr, th, td,
    15 article, aside, canvas, details, embed, 
    16 figure, figcaption, footer, header, hgroup, 
    17 menu, nav, output, ruby, section, summary,
    18 time, mark, audio, video {
    19     margin: 0;
    20     padding: 0;
    21     border: 0;
    22     font-size: 100%;
    23     font: inherit;
    24     vertical-align: baseline;
    25 }
    26 /* HTML5 display-role reset for older browsers */
    27 article, aside, details, figcaption, figure, 
    28 footer, header, hgroup, menu, nav, section {
    29     display: block;
    30 }
    31 body {
    32     line-height: 1;
    33 }
    34 ol, ul {
    35     list-style: none;
    36 }
    37 blockquote, q {
    38     quotes: none;
    39 }
    40 blockquote:before, blockquote:after,
    41 q:before, q:after {
    42     content: '';
    43     content: none;
    44 }
    45 table {
    46     border-collapse: collapse;
    47     border-spacing: 0;
    48 }
     
  • 相关阅读:
    MYSQL删除表的记录后如何使ID从1开始
    Python chardet 字符编码判断
    中文搜索引擎技术揭密
    python 处理中文网页时,忽略特殊字符,忽略异常
    cmd 之基础命令
    自己写的删除主键的存储过程
    朝花夕拾delphi的三层结构
    ERWIN中的一对多标识关系和一对多非标识关系
    翻页用的SQL
    关于 Ajax 的一篇通俗易懂的文章
  • 原文地址:https://www.cnblogs.com/Renyi-Fan/p/12291124.html
Copyright © 2011-2022 走看看