鍘熸枃鍦板潃:
http://perishablepress.com/press/2007/10/23/a-killer-collection-of-global-css-reset-styles/
PS錛?/p>
* {
padding: 0;
margin: 0;
}
榪欏氨鏄渶甯哥敤鐨凜ss Reset錛屼絾鏄繖閲屼細鏈夊緢澶氶棶棰樸?/p>
鍘熸枃鍓嶉儴鍒嗚浜嗗緢澶氬叧浜嶤ss,浠ュ強鍚勬祻瑙堝櫒鐨刢ss瑙勫垯鐨勪笉鍚?鑰屽埗瀹?Css Reset"涔熸槸涓轟簡鍏煎涓庣粺涓,姝g‘鏈夋晥鐨勪嬌鐢?Css Reset"鍙互鍦ㄦ煇縐嶇▼搴︿笂鑺傜害鏃墮棿涓庨噾閽?
闈炲父鎰熻阿Perishable鐨勬暣鐞嗕笌褰掔撼
涓嬮潰鏄叧浜庡嚑綾籆ss Reset鐨勭畝鍗曚粙緇?鏈漢鑳藉姏鏈夐檺.鍙兘鐞嗚В澶ф鎰忔?榪樿鍚勪綅鐪嬪畼瑙佽皡.
Minimalistic Reset [ Version 1 ]
鐩鎬俊榪欎竴孌典綘緇忓父鐪嬪埌.鑰屼笖涔熸槸鎴戜滑緇忓父鐢ㄥ埌鐨?/p>
* {
padding: 0;
margin: 0;
}
Minimalistic Reset [ Version 2 ]
border:0鐨勮璁℃湁浜涗笉闈犺氨浜?/p>
* {
padding: 0;
margin: 0;
border: 0;
}
Minimalistic Reset [ Version 3 ]
褰撶劧榪欎釜涔熸槸涓嶆帹鑽愮殑.浼氳窡鏌愪簺榛樿鏍峰紡鏈夊啿紿?/p>
* {
outline: 0;
padding: 0;
margin: 0;
border: 0;
}
Condensed Universal Reset
榪欐槸浣滆呭綋鍓嶆瘮杈冮挓鎰忕殑涓縐嶅啓娉?淇濊瘉浜嗙浉瀵規櫘閬嶆祻瑙堝櫒鏍峰紡鐨勭粺涓鎬?
* {
vertical-align: baselinebaseline;
font-weight: inherit;
font-family: inherit;
font-style: inherit;
font-size: 100%;
border: 0 none;
outline: 0;
padding: 0;
margin: 0;
}
Poor Man’s Reset
鍏跺疄榪欎篃鏄垜浠父鐢ㄧ殑涓綾籆ss Reset.瀵瑰瓧浣撶殑澶у皬澶嶄綅,浠ュ強鍥劇墖閾炬帴鐨勮竟妗嗗鐞?
涔熺粡甯稿湪鏌愪簺绔欑偣鐪嬪埌
html, body {
padding: 0;
margin: 0;
}
html {
font-size: 1em;
}
body {
font-size: 100%;
}
a img, :link img, :visited img {
border: 0;
}
Shaun Inman’s Global Reset
浣滆呰涓篠haun鍐欒繖綾葷殑Css Reset鏄湁鏌愮鐩殑鎬?
鑰屼笖榪欑被瑙勫垯鏄拡瀵圭殑鏄煇浜涢噸瑕佺殑甯哥敤嫻忚鍣?
姣斿ie,firefox絳?/p>
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre,
form, fieldset, input, p, blockquote, table, th, td, embed, 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;
}
Yahoo CSS Reset
yahoo榪欏府瀹朵紮鍐欑殑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;
}
Erik Meyer’s CSS Reset
浣滆呭皢Erik Meyer鐨勪唬鐮侀噸鏂版暣鐞嗕簡.浣嗗姛鑳戒笂榪樻槸涓鏍風殑
榪欏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, acronym, address, big, cite, code,
dl, dt, dd, ol, ul, li, fieldset, form, label, legend {
vertical-align: baselinebaseline;
font-family: inherit;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
outline: 0;
padding: 0;
margin: 0;
border: 0;
}
/* remember to define focus styles! */
:focus {
outline: 0;
}
body {
background: white;
line-height: 1;
color: black;
}
ol, ul {
list-style: none;
}
/* tables still need cellspacing="0" in the markup */
table {
border-collapse: separate;
border-spacing: 0;
}
caption, th, td {
font-weight: normal;
text-align: left;
}
/* remove possible quote marks (") from <q> & <blockquote> */
blockquote:before, blockquote:after, q:before, q:after {
content: "";
}
blockquote, q {
quotes: "" "";
}
Condensed Meyer Reset
鎬葷殑鏉ヨ榪欐槸瀵笶rik Meyer鐨凜ss 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;
}