Less 是一个Css 预编译器, 意思指的是它可以扩展Css语言, 添加功能如允许变量(variables), 混合(mixins), 函数(functions) 和许多其他的技术, 让你的Css更具维护性, 主题性, 扩展性
安装$ npm install -g less
配置 (对应文件下面介绍)进入 src/main.js 进行配置
import './less/normalize.css'import './less/base.less'目录base.less
@headerHeight: 0.42rem;
* {
box-sizing: border-box;
}
html,
body {
height: 100%;
padding: 0;
margin: 0;
}
body {
font-size: 0.12rem;
background-color: #f4f4f4;
overflow-x: hidden
}
a,
button,
input,
li {
-webkit-tap-highlight-color: transparent;
}
a,
a:active,
a:focus,
a:hover,
a:visited {
text-decoration: none;
}
body,
html a {
color: #333;}
ul,
li {
list-style: none;
padding: 0;
margin: 0;
}
textarea {
border: 0;
outline: none;
}
button {
outline: none;
}
input {
padding-left: 0.1rem;
padding-right: 0.1rem;
outline: none;
border: none;
}
.full-width {
width: 100%;
}
.full-height {
height: 100%;
}
.hidden {
overflow: hidden;
}
.fl { float: left;
}
.fr { float: right;
}.text-ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.txt-center {
text-align: center;
}
.txt-left {
text-align: left;
}
.pos-r {
position: relative;
}
.pos-a {
position: absolute;
}
.pos-f {
position: fixed;
}
.overflow-y-auto {
overflow-y: auto
}
.fix-ios-scroll {
-webkit-overflow-scrolling: touch;
}
.containFooter {
padding-bottom: 0.6rem;
}
.containHeader {
padding-top: 0.42rem;
}
.clearfix:after {
content: "";
display: table;
clear: both;
}*:not(input, textarea) {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.curren-circle {
width: 0.5rem;
height: 0.5rem;
line-height: 0.5rem;
background: #5EADFF;
border: 1px solid #FFFFFF;
box-shadow: 0 3px 11px 0 #5EADFF;
border-radius: 0.5rem;
color: #ffffff;
font-size: 0.12rem;
text-align: center;
vertical-align: middle;
}
.normal-circle {
width: 0.35rem;
height: 0.35rem;
line-height: 0.35rem;
background: #CCCCCC;
border: 2px solid #FFFFFF;
border-radius: 0.35rem;
color: #ffffff;
font-size: 0.12rem;
text-align: center;
vertical-align: middle;
}
.custom-style {
.mint-cell-text {
font-size: 0.15rem;
color: #333333;
line-height: 0.15rem;
}
.mint-field-core {
font-size: 0.15rem;
color: #333333;
line-height: 0.15rem;
background: #F4F4F4;
border-radius: 0.03rem;
padding: 0.06rem 0.1rem;
}
.mint-cell-title {
width: 0.8rem;
}
}
.button-next.disabled {
background: rgba(80, 159, 241, 0.60);
}
.button-next {
background: #509FF1;
border-radius: 3px;
color: #fff;
outline: none;
display: inline-block;
height: 0.46rem;
line-height: 0.46rem;
vertical-align: middle;
text-align: center;
font-size: 0.17rem;
}
[contenteditable="true"],
input,
textarea {
-webkit-user-select: auto !important;
-khtml-user-select: auto !important;
-moz-user-select: auto !important;
-ms-user-select: auto !important;
-o-user-select: auto !important;
user-select: auto !important;
}
@font-face { // 字体文件引入
// font-family: 'Farrington';
// src: url('./Farrington-7B-Qiqi.ttf');}normalize.cssarticle,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary { display: block;
}audio,canvas,video { display: inline-block;
}audio:not([controls]) { display: none; height: 0;
}[hidden],template { display: none;
}html { font-family: sans-serif;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%; }body { margin: 0;
}a { background: transparent;
}a:focus { outline: thin dotted;
}a:active,a:hover { outline: 0;
}h1 { font-size: 2em; margin: 0.67em 0;
}abbr[title] { border-bottom: 1px dotted;
}b,strong { font-weight: bold;
}dfn { font-style: italic;
}hr { -moz-box-sizing: content-box; box-sizing: content-box; height: 0;
}mark { background: #ff0; color: #000;
}code,kbd,pre,samp { font-family: monospace, serif; font-size: 1em;
}pre { white-space: pre-wrap;
}q { quotes: "201C" "201D" "2018" "2019";
}small { font-size: 80%;
}sub,sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline;
}sup { top: -0.5em;
}sub { bottom: -0.25em;
}img { border: 0;
}svg:not(:root) { overflow: hidden;
}figure { margin: 0;
}fieldset { border: 1px solid #c0c0c0; margin: 0 2px; padding: 0.35em 0.625em 0.75em;
}legend { border: 0;
padding: 0; }button,input,select,textarea { font-family: inherit;
font-size: 100%;
margin: 0; }button,input { line-height: normal;
}button,select { text-transform: none;
}button,html input[type="button"], input[type="reset"],input[type="submit"] { -webkit-appearance: button;
cursor: pointer; }button[disabled],html input[disabled] { cursor: default;
}input[type="checkbox"],input[type="radio"] { box-sizing: border-box;
padding: 0; }input[type="search"] { -webkit-appearance: textfield;
-moz-box-sizing: content-box; -webkit-box-sizing: content-box;
box-sizing: content-box;
}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration { -webkit-appearance: none;
}button::-moz-focus-inner,input::-moz-focus-inner { border: 0; padding: 0;
}textarea { overflow: auto;
vertical-align: top; }table { border-collapse: collapse; border-spacing: 0;
}
作者:小贤笔记
链接:https://www.jianshu.com/p/841c87336169



