我们内置了一些常用的 CSS 基础样式,只需添加这些类名就可以使用。
边距
我们提供了基础 内 (padding)、外 (margin) 间距 0、4、8、12、16、20、24、28、32、36、40 对应 0、4px、8px、12px、16px、20px、24px、28px、32px、36px、40px,具体如下:m
|p
-0
|4
|8
|12
|16
|20
|24
|28
|32
|36
|40
m
(t
|r
|b
|l
)|p
(t
|r
|b
|l
)-0
|4
|8
|12
|16
|20
|24
|28
|32
|36
|40
类名 | 描述 |
---|---|
.m-0 |
外边距 0px |
.mt-0 |
上外边距 0px |
.mr-0 |
右外边距 0px |
.mb-0 |
下外边距 0px |
…… | …… |
less 混入
我们提供了图片的基本混入,默认是指向assets/images
这个目录下面,具体使用方法如下:
/*
* 参数依次是
* 图片地址
* 宽度(默认是100%)
* 高度(默认是100%)
* 水平对齐(默认是center)
* 垂直对齐(默认是center)
* 是否重复(默认是no-repeat)
*/
.text{
.bgimage-mixin('page/folder.png',width,height,center,center);
}
/* 解析后的样式 */
.text{
background-size: 100% 100%;
background-position: center middle;
background-repeat: no-repeat;
background-image: url("~@/assets/images/page/folder.png");
}