css样式重置(reset.css)

在页面布局中,经常用到的通用样式重置代码

* {box-sizing: border-box; -webkit-tap-highlight-color: rgba(0,0,0,0);}
body,
dl, dt, dd, ul, ol, li,
h1, h2, h3, h4, h5, h6,
pre, code, form, fieldset, legend, input, textarea,
p, blockquote, th, td, hr, button,
article, aside, details, figcaption, figure, footer, header, menu, nav, section {
  margin: 0;
  padding: 0;
  border: 0;
}
/* 默认不要下划线 */
a {text-decoration: none;}
/* 按钮文本不可选 */
button {user-select: none;}
img {vertical-align: middle;}
/* 加载不出来的图片不要显示灰色边框 */
img:not([src]),img[src=""] {opacity: 0;}
ul, ol {list-style: none;}
table {border-collapse: collapse; border-spacing: 0;}
input, select, button, textarea {font-size: 100%; font: inherit;}
html, body {height: 100%; overflow-x: hidden;}

猜你喜欢

转载自blog.csdn.net/weixin_42418196/article/details/108318827