common.scss
2.47 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
.inline-b {
display: inline-block;
}
.pull-right {
float: right;
}
.green-text {
color: #00A854;
}
.gray-text{
color:#666666;
margin-left:6px;
}
.red-text {
color: rgb(255, 0, 0);
}
.blue-text{
color:$btnBlue;
&:hover{
color: #9994FF;
cursor: pointer;
}
}
.pure-blue-text{
color:$btnBlue;
}
.green {
background-color: #00A854;
}
.red {
color: rgb(255, 0, 0);
}
.flex-center{
display: flex;
justify-content: center;
align-items: center;
}
.additional-text{
height: 22px;
font-size: 16px;
font-weight: 400;
color: #666666;
line-height: 22px;
}
.btn-blue {
height: 32px;
background: $btnBlue;
border-radius: 4px;
color: #fff;
font-size: 14px;
font-weight: 400;
color: #FFFFFF;
padding: 6px 27px;
}
// 单行省略
.ellipsis-1 {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
/* for Opera */
}
// 我这里以两行为例,该方法基本兼容市场上面所有主流浏览器。
.ellipsis-2 {
overflow: hidden;
height: 40px;
line-height: 20px;
position: relative;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
/*显示的行数*/
}
.ellipsis-2-text:after {
content: "...";
position: absolute;
bottom: 0;
right: 15px;
padding-left: 20px;
background: -webkit-linear-gradient(left, transparent, #fff 55%);
/*我在Safari上测试时发现透明到白色中间会有一个黑色的过渡后来我就写成-webkit-linear-gradient(left,rgba(255,255,255,0),rgba(255,255,255,1) 55%)*/
background: -o-linear-gradient(left, transparent, #fff 55%);
background: -moz-linear-gradient(left, transparent, #fff 55%);
background: linear-gradient(to right, transparent, #fff 55%);
}
.ellipsis-4{
overflow: hidden;
height: 40px;
line-height: 20px;
position: relative;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 4;
}
.ellipsis-4-text:after {
content: "...";
position: absolute;
bottom: 0;
right: 15px;
padding-left: 20px;
background: -webkit-linear-gradient(left, transparent, #fff 55%);
/*我在Safari上测试时发现透明到白色中间会有一个黑色的过渡后来我就写成-webkit-linear-gradient(left,rgba(255,255,255,0),rgba(255,255,255,1) 55%)*/
background: -o-linear-gradient(left, transparent, #fff 55%);
background: -moz-linear-gradient(left, transparent, #fff 55%);
background: linear-gradient(to right, transparent, #fff 55%);
}
.statusText {
vertical-align: middle;
}