当前位置: 首页 > 工具软件 > HTML5 Reset > 使用案例 >

重置样式reset.css

乐华晖
2023-12-01

* {
  margin: 0;
  padding: 0;
}

p,
body,
h1,
h2,
h3,
h4,
h5,
h6,
ul,
li,
ol,
dl,
dt,
dd,
hr,
input,
textarea {
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: normal;
}

/* 实现1px边框 */
table {
  border-collapse: collapse;
}

/* 左浮动 */
.fl {
  float: left;
}

/* 右浮动 */
.fr {
  float: right;
}

/* 清浮动 */
.clearfix::after {
  content: '';
  display: block;
  clear: both;
}

/* 解决图片下间隙 */
img {
  vertical-align: middle;
}

/* 去掉轮廓线 */
input,
textarea {
  outline: none;
}

em,
i {
  font-style: normal;
}

strong,
b {
  font-weight: normal;
}

/* 去掉下划线 */
a {
  text-decoration: none;
}

/* 去掉自带列表符 */
ul,
ol {
  list-style: none;
}

body {
  font-size: 12px;
  line-height: 1;
  font-family: "Microsoft YaHei";
}


textarea {
  /*禁止用户改变尺寸*/
  resize: none;
}

del {
  text-decoration: none;
}

/* 版心 */
/* 谁的内容在版心,加一个w的类名 */
.w {
  width: 1180px;
  margin: 0 auto;
}

 类似资料: