常用css reset

Posted mchtig

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了常用css reset相关的知识,希望对你有一定的参考价值。

1、Eric Meyer’s “Reset CSS” 2.0

 1 /** 
 2 * Eric Meyer‘s Reset CSS v2.0 (http://meyerweb.com/eric/tools/css/reset/) 
 3 * http://cssreset.com 
 4 */
 5 html, body, div, span, applet, object, iframe,
 6 h1, h2, h3, h4, h5, h6, p, blockquote, pre,
 7 a, abbr, acronym, address, big, cite, code,
 8 del, dfn, em, img, ins, kbd, q, s, samp,
 9 small, strike, strong, sub, sup, tt, var,
10 b, u, i, center,
11 dl, dt, dd, ol, ul, li,
12 fieldset, form, label, legend,
13 table, caption, tbody, tfoot, thead, tr, th, td,
14 article, aside, canvas, details, embed, 
15 figure, figcaption, footer, header, hgroup, 
16 menu, nav, output, ruby, section, summary,
17 time, mark, audio, video 
18     margin: 0;
19     padding: 0;
20     border: 0;
21     font-size: 100%;
22     font: inherit;
23     vertical-align: baseline;
24 
25 /* HTML5 display-role reset for older browsers */
26 article, aside, details, figcaption, figure, 
27 footer, header, hgroup, menu, nav, section 
28     display: block;
29 
30 body 
31     line-height: 1;
32 
33 ol, ul 
34     list-style: none;
35 
36 blockquote, q 
37     quotes: none;
38 
39 blockquote:before, blockquote:after,
40 q:before, q:after 
41     content: ‘‘;
42     content: none;
43 
44 table 
45     border-collapse: collapse;
46     border-spacing: 0;
47 

2、HTML5 Doctor CSS Reset

/* 
html5doctor.com Reset Stylesheet
v1.6.1
Last Updated: 2010-09-17
Author: Richard Clark - http://richclarkdesign.com 
Twitter: @rich_clark
*/

html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var,
b, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section, summary,
time, mark, audio, video 
    margin:0;
    padding:0;
    border:0;
    outline:0;
    font-size:100%;
    vertical-align:baseline;
    background:transparent;


body 
    line-height:1;


article,aside,details,figcaption,figure,
footer,header,hgroup,menu,nav,section  
    display:block;


nav ul 
    list-style:none;


blockquote, q 
    quotes:none;


blockquote:before, blockquote:after,
q:before, q:after 
    content:‘‘;
    content:none;


a 
    margin:0;
    padding:0;
    font-size:100%;
    vertical-align:baseline;
    background:transparent;




/* change colours to suit your needs */
ins 
    background-color:#ff9;
    color:#000;
    text-decoration:none;


/* change colours to suit your needs */
mark 
    background-color:#ff9;
    color:#000; 
    font-style:italic;
    font-weight:bold;


del 
    text-decoration: line-through;


abbr[title], dfn[title] 
    border-bottom:1px dotted;
    cursor:help;


table 
    border-collapse:collapse;
    border-spacing:0;


/* change border colour to suit your needs */
hr 
    display:block;
    height:1px;
    border:0;   
    border-top:1px solid #cccccc;
    margin:1em 0;
    padding:0;


input, select 
    vertical-align:middle;

3、Yahoo! (YUI 3) Reset CSS

/*
YUI 3.18.1 (build f7e7bcb)
Copyright 2014 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
htmlcolor:#000;background:#FFF
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,tdmargin:0;padding:0
tableborder-collapse:collapse;border-spacing:0
fieldset,imgborder:0
address,caption,cite,code,dfn,em,strong,th,varfont-style:normal;font-weight:normal
ol,ullist-style:none
caption,thtext-align:left
h1,h2,h3,h4,h5,h6font-size:100%;font-weight:normal
q:before,q:aftercontent:‘‘
abbr,acronymborder:0;font-variant:normal
supvertical-align:text-top
subvertical-align:text-bottom
input,textarea,selectfont-family:inherit;font-size:inherit;font-weight:inherit;*font-size:100%
legendcolor:#000

#yui3-css-stamp.cssresetdisplay:none

4、Universal Selector ‘*’ Reset

/* cssreset.com */
* 
margin: 0;
padding: 0;

5.Normalize.css官网

github地址:https://github.com/necolas/normalize.css

 

以上是关于常用css reset的主要内容,如果未能解决你的问题,请参考以下文章

现代 CSS 解决方案:Modern CSS Reset

常用单词

U-Boot常用命令(reset go runmtest)

MySQL常用的几个reset

css学习之 counter属性详解

git 常用命令 mv rm checkout revert reset