Skip to content

Instantly share code, notes, and snippets.

@magicianShiro
Created April 30, 2019 15:52
Show Gist options
  • Save magicianShiro/787a8833dbb656bc56dc77b9fd218264 to your computer and use it in GitHub Desktop.
Save magicianShiro/787a8833dbb656bc56dc77b9fd218264 to your computer and use it in GitHub Desktop.
基础scss设置
body, html, p, h1, h2, h3, h4, h5, h6, ul, li {
margin: 0;
padding: 0;
}
// 以下三个是实现滚动条不占位的代码
html {
overflow-y: scroll;
}
:root {
overflow-y: auto;
overflow-x: hidden;
}
:root body {
position: absolute;
}
body {
width: 100vw;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
background-color: $color-background;
}
a {
display: block;
text-decoration: none;
color: $color-black;
}
p {
font-size: 14px;
color: #666;
line-height: 24px;
}
i {
font-style: normal;
}
ul {
list-style: none;
}
.lf {
float: left;
}
.rf {
float: right;
}
.clearfix {
zoom: 1;
&:after {
visibility: hidden;
display: block;
font-size: 0;
content: "";
clear: both;
height: 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment