-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
80 lines (77 loc) · 1.69 KB
/
style.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
76
77
78
79
80
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: #18191f;
}
.ulClass {
position: relative;
display: flex;
}
.ulClass li {
list-style: none;
}
.ulClass li label {
position: relative;
}
.ulClass li label input[type="checkbox"] {
position: absolute;
opacity: 0;
cursor: pointer;
}
.ulClass li label .icon {
position: relative;
width: 60px;
height: 60px;
background: #18191f;
color: #555555;
font-size: 24px;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
margin: 0 10px;
border-radius: 10px;
overflow: hidden;
box-shadow: -1px -1px 4px rgba(255, 255, 255, 0.05),
4px 4px 6px rgba(0, 0, 0, 0.2),
inset -1px -1px 4px rgba(255, 255, 255, 0.05),
inset 1px 1px 1px rgba(0, 0, 0, 0.1);
}
.ulClass li label .icon:before {
content: "";
position: absolute;
top: 2px;
left: 2px;
width: calc(100% - 5px);
height: calc(50% - 2px);
border-top-left-radius: 8px;
border-top-right-radius: 8px;
background: rgba(255, 255, 255, 0.05);
}
/* input[type="checkbox"]:checked :前后不要有空格!否则没效果 */
.ulClass li label input[type="checkbox"]:checked ~ .icon {
box-shadow: inset 0px 0px 4px rgba(255, 255, 255, 0.05),
inset 4px 4px 6px rgba(0, 0, 0, 0.2);
}
/* .fa 导入的图标库的样式 */
/* 当点击时图标发光 */
.ulClass li label input[type="checkbox"]:checked ~ .icon .fa {
color: #00f3ff;
text-shadow: 0 0 15px #00f3ff, 0 0 25px #00f3ff;
animation: shine 3s linear infinite;
}
@keyframes shine {
0% {
filter: hue-rotate(0deg);
}
100% {
filter: hue-rotate(360deg);
}
}