1、新建文件
// @ 2017/11/2
// 初始化样式表
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,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
button,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
margin: 0;
padding: 0;
border: 0;
background: transparent;
outline: none;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
// color: rgba(0, 0, 0, .84);
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
// font-family: medium-content-sans-serif-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
// font-family: medium-content-serif-font,Georgia,Cambria,"Times New Roman",Times,serif;
// -moz-user-select: none;
// -webkit-user-select: none;
// user-select:auto;
}
body {
font-size: 12px;
}
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
display: block;
}
ol,
ul {
list-style: none;
}
button {
background: transparent;
}
blockquote,
q {
quotes: none;
}
blockquote:before,
blockquote:after,
q:before,
q:after {
content: '';
content: none;
}
strong {
font-weight: bold;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
img {
border: 0;
max-width: 100%;
}
html {
line-height: initial;
}
// ::-webkit-media-controls {
// display: none !important;
// }
// ::-webkit-scrollbar {
// display:none;
// width: 8px;
// }
// ::-webkit-scrollbar-thumb {
// background-color: #c1c1c1;
// border-radius: 4px;
// }
2、引入到main.js文件中
import "@/style/Reset.scss";
3、扩展
1.css reset:这个是我们在做项目时比较常用的一套css初始化样式,在这里就直接给出代码了
html, body, div, span, applet