-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathfloat.css
75 lines (67 loc) · 1.34 KB
/
float.css
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
.wrapper {
display: flex;
margin: 50px auto;
width: auto;
overflow: hidden;
border-radius: 8px;
padding: 15px;
box-shadow: 20px 20px 60px #bebebe, -20px -20px 60px #ffffff;
}
.text {
width: 88%;
font-size: 0.8rem;
overflow: hidden;
padding: 20px;
padding-top: 10px;
padding-bottom: 10px;
padding-right: 15px;
text-overflow: ellipsis;
text-align: justify;
background: #f1f1f1;
margin: auto;
line-height: 1.3rem;
border-radius: 10px;
/* display: flex; */
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
position: relative;
}
.text::before {
content: '';
height: calc(100% - 24px);
float: right;
background: #000
}
.text::after {
content: '';
width: 100%;
height: 100%;
position: absolute;
background: #fff;
}
.btn {
float: right;
clear: both;
margin-left: 10px;
font-size: 0.8rem;
padding: 0 8px;
background: #3c6e9e;
line-height: 24px;
border-radius: 4px;
color: #fff;
cursor: pointer;
/* margin-top: -30px; */
}
.btn::before {
content: '展开'
}
.exp {
display: none;
}
.exp:checked+.text {
-webkit-line-clamp: 999;
}
.exp:checked+.text .btn::before {
content: '收起'
}