CSS Reset

CSS Reset不应该只是清除默认样式,而是应该在项目初期就确定好的一个全局样式的定义。

      HTML Only   
article

h1

h2

h3

h4

h5
h6
address

p

pre
blockquote
  1. ol li
  • ul li
dl dt
dl dd
table caption
table thead tr th
table tbody tr td
table tfoot tr td
form
fieldset legend
del ins a em strong i b u s small abbr q cite dfn sub sup code kbd samp var mark

这是一篇未使用reset的html代码,可以看到有许多默认样式。
下面是CSSReset的代码,仅供参考

html,body,h1,h2,h3,h4,h5,h6,div,dl,dt,dd,ul,ol,li,p,blockquote,pre,hr,figure,table,caption,th,td,form,fieldset,legend,input,button,textarea,menu{margin:0;padding:0;}header,footer,section,article,aside,nav,hgroup,address,figure,figcaption,menu,details{display:block;}table{border-collapse:collapse;border-spacing:0;}caption,th{text-align:left;font-weight:normal;}html,body,fieldset,img,iframe,abbr{border:0;}i,cite,em,var,address,dfn{font-style:normal;}[hidefocus],summary{outline:0;}li{list-style:none;}h1,h2,h3,h4,h5,h6,small{font-size:100%;}sup,sub{font-size:83%;}pre,code,kbd,samp{font-family:inherit;}q:before,q:after{content:none;}textarea{overflow:auto;resize:none;}label,summary{cursor:default;}a,button{cursor:pointer;}h1,h2,h3,h4,h5,h6,em,strong,b{font-weight:normal;}del,ins,u,s,a,a:hover{text-decoration:none;}body,textarea,input,button,select,keygen,legend{font:12px/1.14 arial,simsun;color:#333;outline:0;}body{background:#fff;}a,a:hover{color:#333;}
CSS Reset_第1张图片
Paste_Image.png

你可能感兴趣的:(CSS Reset)