簡化的CSS Reset:15套CSS重設實例
互聯(lián)網(wǎng) 發(fā)布時間:2009-04-02 19:36:40 作者:佚名
我要評論
網(wǎng)頁制作Webjx文章簡介:CSS重設就是由于各種瀏覽器解釋CSS樣式的初始值有所不同,導致設計師在沒有定義某個CSS屬性時,不同的瀏覽器會按照自己的默認值來為沒有定義的樣式賦值,所以我們要先定義好一些CSS樣式,來讓所有瀏覽器都按照同樣的規(guī)
CSS重設就是由于各種瀏覽器解釋CSS樣式的初始值有所不同,導致設計師在沒有定義某個CSS屬性時,不同的瀏覽器會按照自己的默認值來為沒有定義的樣式賦值,所以我們要先定義好一些CSS樣式,來讓所有瀏覽器都按照同樣的規(guī)則解釋CSS,這樣就能避免發(fā)生這種問題. 六.Yahoo(YUI) CSS Reset:
七.Eric Meyer’s 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;
}
八.Condensed Meyer 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: 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: “” “”;
}
九.Ateneu Popular 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;
}
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;
}
十.Chris Poteet’s Reset CSS
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
}
* {
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;
}
相關文章
css行內(nèi)元素padding,margin,width,height沒有變化
這篇文章主要介紹了css行內(nèi)元素設置padding,margin,width,height沒有變化的解決方法,需要的朋友可以參考下2014-05-07- 本文從語法結(jié)構(gòu)、可能取的值、瀏覽器兼容問題等方面為大家介紹下padding和margin的異同點另附截圖,有想學習的朋友可以參考下哈,希望對大家有所幫助2013-07-28
CSS邊距屬性定義是用margin還是用padding的兩者對比
用CSS做網(wǎng)頁時.邊距用哪個屬于好呢?是margin屬性還是padding屬性呢.2012-06-12- 關鍵字描述:詳解 樣式 風格 solid 必要   修改 padding:0 margin:0 body{font-size:9pt; background:url($imgpath/$stylepath/bodybg.gif) repeat-x ; font-famil2009-06-06
- 關鍵字描述:注釋 大全 樣式 默認 模板 定義 margin:0 10px padding:0 下面這個是默認的ZBLOG CSS樣式表 里面附帶有最全的CSS注釋 讓你一看就理解了。如果您覺得麻煩2009-06-06
Css Reset(復位)的簡單介紹-CSS教程-網(wǎng)頁制作-網(wǎng)頁教學網(wǎng)
Css Reset是什么? 有些同行叫 "css復位",有些可能叫 "默認css"..... 相信看完全文您會對Css Reset有個重新的認識 原文地址: http://perishablepre2008-10-17
在CSS中margin是指從自身邊框到另一個容器邊框之間的距離,就是容器外距離。在CSS中padding是指自身邊框到自身內(nèi)部另一個容器邊框之間的距離,就是容器內(nèi)距離。下面講解 pa2017-06-26


