mixins.scss
1.07 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
@mixin round-borders ($radius) {
border-radius: $radius;
-moz-border-radius: $radius;
-webkit-border-radius: $radius;
}
@mixin justify-align-center() {
display: flex;
justify-content: center;
align-items: center;
}
@mixin justify-align-between() {
display: flex;
align-items: center;
justify-content: space-between;
}
@mixin justify-between {
display: flex;
justify-content: space-between;
}
@mixin justify-center() {
display: flex;
justify-content: center;
}
@mixin align-center() {
display: flex;
align-items: center;
}
@mixin ellipsis() {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
// 固定显示多上行,size:固定显示的行数
@mixin line-clamp($size) {
overflow: hidden;
text-overflow: ellipsis;
line-clamp: $size;
-webkit-line-clamp: $size;
display: -webkit-box;
-webkit-box-orient: vertical;
}
// 旋转角度
@mixin transform-rotate($deg) {
transform: rotate($deg);
-ms-transform: rotate($deg);
-moz-transform: rotate($deg);
-webkit-transform: rotate($deg);
-o-transform: rotate($deg);
}