css reset 样式重置

耗尽温柔 提交于 2020-01-22 22:56:04

css reset 重置默认样式,html 中有的标签自带默认样式,样式重置的目的是为了减少浏览器的不一致性。
根据页面的需要自行修改。

body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td {
  margin:0;
  padding:0;
}
body, button, input, select, textarea {
  font: 12px/1.5 PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Arial,sans-serif;
}
h1, h2, h3, h4, h5, h6 {
  font-size: 100%;
}
address, cite, em { /*cite对某个参考文献引用,*/
  font-style: normal;
}
small {
  font-size: 12px;
}
ul, ol {
  list-style: none;
}
a {
  color: #333;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
sup {
   vertical-align: text-top;
}
sub{
  vertical-align: text-bottom;
}
legend { /*legend元素为fieldset元素定义标题*/
  color: #000;
}
fieldset, img { /*fieldset组合表单中的相关元素*/
  border: 0;
}
button, input, select, textarea {  /*select选择列表*/
  font-size: 100%;
}
table {
  border-collapse: collapse; /*border-collapse为表格设置合并边框模型*/
  border-spacing: 0;
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!