For small Web sites, using this does not bring a huge waste of resources, but if it is such a very large site like Yahoo, just need to have a choice of CSS reset to reduce resource waste.
Are you using CSS to reset with CSS? Of course, you may use it, but you do not know it is being used, such as you may often use:
Program code
* {padding:0; margin:0; border:0;}
This is also a method of CSS reset, so that all the selectors padding, margin and border are set to 0. This is a powerful method and the simplest and safest method, but it is also the most resource-intensive approach. For small Web sites, using this does not bring a huge waste of resources, but if it is such a very large site like Yahoo, just need to have a choice of CSS reset to reduce resource waste. The following is the Yahoo CSS Reset code, but also by the most people like the CSS reset method, Yui Choose the method is:
Program code
Body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,
Form,fieldset,input,textarea,p,blockquote,th,td {
padding:0;
margin:0;
}
Table {
border-collapse:collapse;
border-spacing:0;
}
Fieldset,img {
border:0;
}
Address,caption,cite,code,dfn,em,strong,th,var {
font-weight:normal;
Font-style:normal;
}
Ol,ul {
List-style:none;
}
caption,th {
Text-align:left;
}
H1,h2,h3,h4,h5,h6 {
font-weight:normal;
font-size:100%;
}
Q:before,q:after {
content:;
}
abbr,acronym {border:0;
}
OK, I believe you have already understood the purpose of CSS reset, perhaps you can also according to their own preferences, write a CSS reset system, after all, the needs of everyone and habits of different. And you can refer to the following:
Ateneu Popular CSS Reset
Program code
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;
}
: Focus {outline:0;}
A, A:link, a:visited, A:hover, A:active{text-decoration:none}
Table {border-collapse:separate;border-spacing:0;}
Th, TD {Text-align:left; font-weight:normal;}
IMG, iframe {border:none; text-decoration:none;}
OL, ul {list-style:none;}
Input, textarea, select, button {Font-size:100%;font-family:inherit}
Select {Margin:inherit;}
HR {margin:0;padding:0;border:0;color: #000; Background-color: #000; height:1px}
Chris Poteet ' s Reset CSS
Program code
* {
Vertical-align:baseline;
Font-family:inherit;
Font-style:inherit;
font-size:100%;
Border:none;
padding:0;
margin:0;
}
Body {
padding:5px;
}
H1, H2, H3, H4, H5, H6, p, Pre, blockquote, form, UL, OL, DL {
margin:20px 0;
}
Li, DD, blockquote {
margin-left:40px;
}
Table {
Border-collapse:collapse;
border-spacing:0;
}
Eric Meyer Reset CSS
Program code
HTML, body, Div, span, applet, object, IFRAME, table, caption,
Tbody, TFOOT, THEAD, tr, TH, TD, Del, DFN, EM, Font, IMG, INS,
KBD, Q, S, Samp, small, strike, strong, sub, SUP, TT, VAR,
H1, H2, H3, H4, H5, H6, p, blockquote, Pre, A, abbr,
Acronym, address, big, cite, code, DL, DT, DD, OL, UL, Li,
FieldSet, form, label, legend {
Vertical-align:baseline;
Font-family:inherit;
Font-weight:inherit;
Font-style:inherit;
font-size:100%;
outline:0;
padding:0;
margin:0;
border:0;
}
: Focus {
outline:0;
}
Body {
Background:white;
Line-height:1;
Color:black;
}
OL, UL {
List-style:none;
}
Table {
Border-collapse:separate;
border-spacing:0;
}
caption, Th, TD {
Font-weight:normal;
Text-align:left;
}
Blockquote:before, Blockquote:after, Q:before, Q:after {
Content: "";
}
BLOCKQUOTE, Q {
Quotes: "" "";
}
Tantek Celik Reset CSS
Program code
: link,:visited {Text-decoration:none}
Ul,ol {List-style:none}
H1,h2,h3,h4,h5,h6,pre,code {font-size:1em;}
Ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,body,html,p,blockquote,fieldset,input
{margin:0; padding:0}
A Img,:link img,:visited img {border:none}
Address {Font-style:normal}
Christian Montoya Reset CSS
Program code
HTML, body, form, fieldset {
margin:0;
padding:0;
font:100%/120% Verdana, Arial, Helvetica, Sans-serif;
}
H1, H2, H3, H4, H5, H6, p, Pre,
BLOCKQUOTE, UL, OL, DL, address {
Margin:1em 0;
padding:0;
}
Li, DD, blockquote {
Margin-left:1em;
}
Form Label {
Cursor:pointer;
}
fieldset {
Border:none;
}
Input, select, textarea {
font-size:100%;
Font-family:inherit;
}
Rudeworks Reset CSS
Program code
* {
margin:0;
padding:0;
Border:none;
}
HTML {
font:62.5% "Lucida Grande", Lucida, Verdana, Sans-serif;
Text-shadow: #000 0px 0px 0px;
}
UL {
List-style:none;
List-style-type:none;
}
H1, H2, H3, H4, H5, H6, p, Pre,
BLOCKQUOTE, UL, OL, DL, address {
Font-weight:normal;
margin:0 0 1em 0;
}
Cite, EM, DFN {
Font-style:italic;
}
sup {
position:relative;
Bottom:0.3em;
Vertical-align:baseline;
}
Sub {
position:relative;
Bottom: -0.2em;
Vertical-align:baseline;
}
Li, DD, blockquote {
Margin-left:1em;
}
Code, KBD, Samp, Pre, TT, VAR, input[type= ' text '], textarea {
font-size:100%;
Font-family:monaco, "Lucida Console", Courier, Mono-space;
}
del {
Text-decoration:line-through;
}
Ins, DFN {
border-bottom:1px solid #ccc;
}
Small, SUP, sub {
font-size:85%;
}
ABBR, acronym {
Text-transform:uppercase;
font-size:85%;
Letter-spacing:. 1em;
border-bottom-style:dotted;
border-bottom-width:1px;
}
A ABBR, a acronym {
Border:none;
}
sup {
Vertical-align:super;
}
Sub {
Vertical-align:sub;
}
H1 {
Font-size:2em;
}
H2 {
Font-size:1.8em;
}
h3 {
Font-size:1.6em;
}
h4 {
Font-size:1.4em;
}
h5 {
Font-size:1.2em;
}
h6 {
Font-size:1em;
}
A, A:link, a:visited, A:hover, a:active {
outline:0;
Text-decoration:none;
}
A img {
Border:none;
Text-decoration:none;
}
IMG {
Border:none;
Text-decoration:none;
}
Label, Button {
Cursor:pointer;
}
Input:focus, Select:focus, Textarea:focus {
Background-color: #FFF;
}
fieldset {
Border:none;
}
. Clear {
Clear:both;
}
. float-left {
Float:left;
}
. float-right {
Float:right;
}
Body {
Text-align:center;
}
#wrapper {
margin:0 Auto;
Text-align:left;
}
anieto2k Reset CSS
Program code
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,
Center, u, b, I {
margin:0;
padding:0;
border:0;
outline:0;
Font-weight:normal;
Font-style:normal;
font-size:100%;
Font-family:inherit;
Vertical-align:baseline
}
Body {
Line-height:1
}
: Focus {
outline:0
}
OL, UL {
List-style:none
}
Table {
Border-collapse:collapse;
border-spacing:0
}
Blockquote:before, Blockquote:after, Q:before, Q:after {
Content: ""
}
BLOCKQUOTE, Q {
Quotes: "" "" "
}
Input, textarea {
margin:0;
padding:0
}
HR {
margin:0;
padding:0;
border:0;
Color: #000;
Background-color: #000;
height:1px
}
Csslab CSS Reset
Program code
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;
}
: Focus {
outline:0;
}
Table {
Border-collapse:separate;
border-spacing:0;
}
caption, Th, TD {
Text-align:left;
Font-weight:normal;
}
A img, iframe {
Border:none;
}
OL, UL {
List-style:none;
}
Input, textarea, select, button {
font-size:100%;
Font-family:inherit;
}
Select {
Margin:inherit;
}
/* Fixes incorrect placement of numbers in Ol ' s in IE6/7 * *
OL {margin-left:2em;}
* = = Clearfix = = *
. clearfix:after {
Content: ".";
Display:block;
height:0;
Clear:both;
Visibility:hidden;
}
. clearfix {Display:inline-block}
* HTML. Clearfix {height:1%}
. clearfix {Display:block}