meyerCSS样式重置:https://meyerweb.com/eric/tools/css/reset/
国际知名CSS Reset 总结:https://www.cnblogs.com/lguow/p/10441869.html
CSS Reset(样式重置):https://blog.csdn.net/eason_severus/article/details/53665074(可以借鉴)
normalize.css:http://necolas.github.io/normalize.css/
自己开发中使用的样式
- PC重置
@charset "utf-8";
html,body{
height: 100%;
}
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td, figure {
margin: 0;
padding: 0;
}
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
display: block;
}
fieldset, img, iframe {
border: 0;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
ol, ul {
list-style: none;
}
caption, th {
text-align: left;
}
h1, h2, h3, h4, h5, h6 {
font-size: 100%;
}
sup {
vertical-align: text-top;
}
sub {
vertical-align: text-bottom;
}
address, caption, cite, code, dfn, em, strong, th, var, b, i {
font-style: normal;
font-weight: normal;
}
a {
color: #333;
text-decoration: none;
}
a:active {
color: #333;
}
input, textarea, select, button {
font-family: inherit;
font-size: inherit;
font-weight: inherit;
}
input, textarea, select {
outline: none;
*font-size: 100%;
}
input, select {
vertical-align: middle;
}
legend {
color: #333;
}
textarea {
resize: none;
}
img,a img {
display: block;
border: 0;
}
- 移动端重置
@charset "utf-8";
*,
::before,
::after {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html,body{
height: 100%;
-webkit-text-size-adjust: 100%;
}
body {
font: 14px/1.75 -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
-webkit-tap-highlight-color: rgba(0,0,0,0);
background-color: #efeff4;
-webkit-overflow-scrolling: touch;
}
a {
text-decoration: none;
color: #333;
}
ul,
ol {
list-style: none;
}
input[type="text"],
input[type="search"],
textarea {
border: none;
outline: none;
resize: none;
-webkit-appearance: none;
}
img {
display: block;
max- 100%;
}