PS:
*{
padding:0;
margin:0;
}
这便是最常见的Css Reset,可是这里会有许多难题。
原文前一部分说了许多有关Css,和各访问器的css标准的不一样,而制订"CssReset"也是以便适配与统1,正确合理的应用"Css Reset"能够在某种水平上节省時间与钱财.
十分谢谢Perishable的梳理与梳理 下面是有关几类Css Reset的简易详细介绍,自己工作能力比较有限.只能了解大约意思,还请各位看官见谅.
Minimalistic Reset [ Version 1 ]
坚信这1段你常常看到.并且也是大家常常用到的
*{
padding:0;
margin:0;
}
Minimalistic Reset [ Version 2 ]
border:0的设计方案一些不可靠了
*{
padding:0;
margin:0;
border:0;
}
Minimalistic Reset [ Version 3 ] 自然这个也是不强烈推荐的.会跟一些默认设置款式有矛盾
*{
outline:0;
padding:0;
margin:0;
border:0;
}
Condensed Universal Reset
这是作者当今较为钟意的1种写法.确保了相对性广泛访问器款式的统1性.
*{
vertical-align:baselinebaseline;
font-weight:inherit;
font-family:inherit;
font-style:inherit;
font-size:100%;
border: 0none;
outline:0;
padding:0;
margin:0;
}
Poor Man’s Reset 实际上这也是大家常见的1类Css 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 作者觉得Shaun写这类的Css Reset是有某种目地性.
并且这类标准是对于的是一些关键的常见访问器.
例如ie,firefox等
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的编码再次梳理了.但作用上還是1样的
这套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;
}
: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: """";
}
Condensed Meyer Reset
总的来讲这是对Erik Meyer的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;
}