Skip to content

linfushan/CSSRESET

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cssreset

css style reset by linfs

2017-08-31 created

有margin值的元素有:

body h1 h2 h3 h4 h5 h6 p blockquote pre hr figure dl dd ul ol fieldset menu

有padding值的元素有:

ul ol button th td fieldset legend textarea menu

有border值的元素有:

hr input button fieldset textarea

虽然这些都有border,不过个人觉得没有必要进行重置。

body,h1,h2,h3,h4,h5,h6,p,blockquote,pre,hr,figure, dl,dd,ul,ol,fieldset,menu{margin:0}
ul,ol,button,th,td,fieldset,legend,textarea,menu{padding:0}
HTML5新标签针对旧浏览器重置
header,footer,section,article,aside,nav,hgroup,address,figure,figcaption,menu,details{display:block;}
其它元素样式重置
body
body{
  line-height:1;
}
字体大小
h1,h2,h3,h4,h5,h6,pre{
  font-size:100%;
}
列表
ol,ul{
  list-style:none;
}
表格
table {
  border-collapse: collapse;
  border-spacing: 0;
}
链接
:link,:visited{
  text-decoration:none;
}
金手指
a,button,input[type='button']{
  cursor:pointer;
}
利用伪类清除浮动
.clearfix:after {
  content:".";
  display:block;
  height:0;
  visibility:hidden;
  clear:both;
}
.clearfix {
  *zoom:1;
}

查看 cssreset文件说明

更多css规范 NEC

About

css style reset by linfs

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages