Css Reset(復(fù)位)方法整理
更新時間:2008年09月12日 10:27:14 作者:
Css Reset是什么? 有些同行叫 "css復(fù)位",有些可能叫 "默認css".....
Erik Meyer's CSS Reset
作者將Erik Meyer的代碼重新整理了.但功能上還是一樣的
這套Css Reset是業(yè)內(nèi)是使用最多的
復(fù)制代碼 代碼如下:
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
總的來說這是對Erik Meyer的Css Reset的修改與提升.
復(fù)制代碼 代碼如下:
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;
}
相關(guān)文章
用javascript來控制 鏈接的target 屬性的代碼
用javascript來控制 鏈接的target 屬性的代碼...2007-11-11Zen Coding 快速編寫HTML/CSS代碼的實現(xiàn)
在本文中我們將展示一種新的使用仿CSS選擇器的語法來快速開發(fā)HTML和CSS的方法。它由Sergey Chikuyonok開發(fā)。2011-01-01css position: absolute、relative詳解
今天在看CSS的時候遇到了position: absolute、relative的問題,一直比較迷糊,今天終于搞清楚了。2008-11-11position:relative/absolute無法沖破的等級
position:relative/absolute無法沖破的等級...2007-03-03