zoukankan      html  css  js  c++  java
  • [转载]CSS Tools: Reset CSS

    http://meyerweb.com/eric/tools/css/reset/

    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.

    /* http://meyerweb.com/eric/tools/css/reset/ 
       v2.0 | 20110126
       License: none (public domain)
    */
    
    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, img, ins, kbd, q, s, samp,
    small, strike, strong, sub, sup, tt, var,
    b, u, i, center,
    dl, dt, dd, ol, ul, li,
    fieldset, form, label, legend,
    table, caption, tbody, tfoot, thead, tr, th, td,
    article, aside, canvas, details, embed, 
    figure, figcaption, footer, header, hgroup, 
    menu, nav, output, ruby, section, summary,
    time, mark, audio, video {
    	margin: 0;
    	padding: 0;
    	border: 0;
    	font-size: 100%;
    	font: inherit;
    	vertical-align: baseline;
    }
    /* HTML5 display-role reset for older browsers */
    article, aside, details, figcaption, figure, 
    footer, header, hgroup, menu, nav, section {
    	display: block;
    }
    body {
    	line-height: 1;
    }
    ol, ul {
    	list-style: none;
    }
    blockquote, q {
    	quotes: none;
    }
    blockquote:before, blockquote:after,
    q:before, q:after {
    	content: '';
    	content: none;
    }
    table {
    	border-collapse: collapse;
    	border-spacing: 0;
    }
    

    Previous Versions

    1. v1.0 (200802)

    Acknowledgments

    Thanks to Paul Chaplin for the blockquote / q rules.

  • 相关阅读:
    Linux 多进程锁的几种实现方案
    Linux man手册没有pthread_mutex_init的解决办法
    IP地址结构信息与字符串相互转化:inet_pton和inet_ntop, etc.
    Linux 将计算md5值功能做成md5命令
    Unix/Linux inet守护进程
    Unix/Linux syslogd守护进程 & 日志记录syslog
    UNP 学习笔记 #11 名字与地址转换
    git 使用总结
    AUPE 输出致标准错误的出错函数分析与实现 err_sys, err_quit, err_doit etc.
    Linux C常见数I/O函数比较: printf, sprintf, fprintf, write...
  • 原文地址:https://www.cnblogs.com/Benoly/p/4248580.html
Copyright © 2011-2022 走看看