A more complete set of CSS resets

Source: Internet
Author: User

One. The most simplified CSS reset (reset):

{      padding: 0;       margin: 0;}

This is the most common and simplest CSS reset, setting the padding and margin values of all elements to 0, which avoids the "divergence" of some browsers in understanding the default values of the two properties.

Two. Condensed and useful CSS Reset (reset):

{       vertical-align: baseline;        font-weight: inherit;        font-family: inherit;        font-style: inherit;        font-size: 100%;        outline: 0;        padding: 0;        margin: 0;        Border: 0;}

Three. Poor man's CSS Reset:

{       padding: 0;        margin: 0;}  {       font-size:1em;}  {       font-size:100%;}  {       border:0px;}

This reset method sets the padding and margin of the HTML and body elements to 0, setting the initial font size for all the elements under the HTML tag and the body tag, and most importantly, removing the default border of the linked picture.

Four. Siolon ' s Global Reset

{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;}

Five. Shaun Inman ' s Global Reset

body, Div, DL, DT, DD, UL, OL, Li, H1, H2, H3, H4, H5, H6, Pre, form, fieldset, input, p, blockquote, table, TH, TD, E Mbed, Object{padding:0;margin:0;}Table{Border-collapse:collapse;border-spacing:0;}fieldset, IMG, abbr{Border:0;}address, caption, cite, code, DFN, EM,H1, H2, H3, H4, H5, H6, strong, Th, var{Font-weight:Normal;Font-style:Normal;}ul{List-style:None;}caption, Th{text-align: Left;}H1, H2, H3, H4, H5, H6{font-size:1.0em;}Q:before, Q:after{content:";}A, INS{text-decoration:None;}

Six. Yahoo (YUI) CSS Reset:

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;}

Seven. Eric Meyer ' s CSS Reset

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,acrony M, 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: "" "";}

Eight. Condensed Meyer Reset:

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;}fieldset, img{Border:0;}Table{Border-collapse:collapse;border-spacing:0;}OL, UL{List-style:None;}address, caption, cite, code, DFN, EM, strong, Th, var{Font-weight:Normal;Font-style:Normal;}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;}

Nine. Ateneu Popular CSS Reset

html, body, Div, span, applet, object, IFRAME, H1, H2, H3,h4, H5, H6, p, blockquote, Pre, A, abbr, acronym,address, Bi g, 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}

X. Csslab 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;}: 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;}

A more complete set of CSS resets

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.