mixin.less
1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
@blue: #3190e8;
@bc: #e4e4e4;
@fc: #fff;
// 背景图片地址和大小
.bis(@url) {
background-image: url(@url);
background-repeat: no-repeat;
background-size: 100% 100%;
}
//定位全屏
.allcover {
position: absolute;
top: 0;
right: 0;
}
//transform上下左右居中
.ctt {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
//定位上下左右居中
.ctp(@width, @height) {
position: absolute;
top: 50%;
left: 50%;
margin-top: -@height/2;
margin-left: -@width/2;
}
//定位上下居中
.tb {
position: absolute;
top: 50%;
transform: translateY(-50%);
}
//定位左右居中
.lr {
position: absolute;
left: 50%;
transform: translateX(-50%);
}
//宽高
.wh(@width, @height) {
width: @width;
height: @height;
}
//字体大小、行高、字体
.ft(@size, @line-height) {
font-size: @size;
line-height: @line-height;
}
//字体大小,颜色
.sc(@size, @color) {
font-size: @size;
color: @color;
}
//flex 布局和 子元素 对其方式
.fj(@type: space-between) {
display: flex;
justify-content: @type;
}