- 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
- }
CSSLabCSS 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;
- }
- aimg,iframe{
- border:none;
- }
- ol,ul{
- list-style:none;
- }
- input,textarea,select,button{
- font-size:100%;
- font-family:inherit;
- }
- select{
- margin:inherit;
- }
- /*Fixesincorrectplacementofnumbersinol’sinIE6/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;}
像你看到的,這些都大同小異,需求不同,方法也就不同。我自己偏向於喜歡Yahoo的CSS Reset,也用了Yahoo的代碼。你,有自己的CSS Reset體系嗎?或許可以分享出來!
CSS Reset代碼來源:10TécnicASParaResetCSS