css初始化minireset.css

  一个很小的现代CSS重置,涵盖了基本内容:

  •  重置字体大小:这样使用语义标记不会影响样式
  • 重置块边距:所以只有在需要时才应用间距
  • 重置表格:这样表格数据只占用它所需的空间
  • 保留了行内间距:因此,按钮和输入保持其默认布局
  • 设置边框的大小:这样边框和划线不会影响设置的尺寸
  • 设置响应的媒体元素:以便图像和嵌入与浏览器的宽度成比例。

开源地址:https://github.com/jgthms/minireset.css

应用网站:腾讯网

/*! minireset.css v0.0.3 | MIT License | github.com/jgthms/minireset.css */
html,
body,
p,
ol,
ul,
li,
dl,
dt,
dd,
blockquote,
figure,
fieldset,
legend,
textarea,
pre,
iframe,
hr,
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  padding: 0;
}

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

ul {
  list-style: none;
}

button,
input,
select,
textarea {
  margin: 0;
}

html {
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: inherit;
}

img,
embed,
iframe,
object,
audio,
video {
  height: auto;
  max-width: 100%;
}

iframe {
  border: 0;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

td,
th {
  padding: 0;
  text-align: left;
}
原文地址:https://www.cnblogs.com/qingsong/p/9753629.html