# 移动端
* {
outline: 0;
margin: 0;
padding: 0;
vertical-align: baseline;
-webkit-tap-highlight-color: transparent;
}
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;
vertical-align: baseline;
}
img {
border: 0 none;
vertical-align: top;
}
i, em {
font-style: normal;
}
ol, ul {
list-style: none;
}
input, select, button, h1, h2, h3, h4, h5, h6 {
font-size: 100%;
font-family: inherit;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
a {
text-decoration: none;
}
body {
margin: 0 auto;
height: 100vh;
line-height: 1;
text-size-adjust: 100% !important;
}
input[type="text"], textarea {
appearance: none;
}
# PC端
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header,
menu, nav, output, ruby, section, summary,
time, mark, audio, video, input {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font-weight: normal;
}
article, aside, details, figcaption, figure,
footer, header, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
a {
text-decoration: none;
-webkit-backface-visibility: hidden;
}
li {
list-style: none;
}
select,input,button{
outline: none;
}
body {
-webkit-text-size-adjust: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
button,input{
outline: none
}
参考链接
京东 凹凸实验室 (opens new window)
Eric Meyer's Reset CSS (opens new window)
← 2. 代码规范