-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathColorfull-Checkbox.css
94 lines (80 loc) · 2 KB
/
Colorfull-Checkbox.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
@import url('https://fonts.googleapis.com/css?family=Poppins');
#Colorful-Checkbox{
margin: 0;
padding: 0;
height: 100vh;
background: #222;
display: flex;
justify-content: center;
align-items: center;
font-family: 'Poppins', sans-serif;
position: relative;
}
.container{
max-width: 1200px;
margin: 0 auto;
display: flex;
flex-wrap: wrap;
top: 250px;
}
.container div{
margin: 10px;
}
.container div label{
cursor: pointer;
}
.container div label input[type="checkbox"]{
display: none;
}
.container div label span{
position: relative;
display: inline-block;
background: #424242;
padding: 15px 30px;
color: rgb(122, 122, 122);
text-shadow: 0 1px 4px rgba(0,0,0,0.5);
border-radius: 30px;
font-size: 20px;
transition: 0.5s;
user-select: none;
overflow: hidden;
}
.container div label span::before{
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 50%;
background: rgba(255,255,255,0.1);
}
.container div:nth-child(6n + 1) label input[type="checkbox"]:checked ~ span{
background: #e91e63;
color: #fff;
box-shadow: 0 2px 20px #e91e63;
}
.container div:nth-child(6n + 2) label input[type="checkbox"]:checked ~ span{
background: rgb(10, 206, 10);
color: #fff;
box-shadow: 0 2px 20px rgb(10, 206, 10);
}
.container div:nth-child(6n + 3) label input[type="checkbox"]:checked ~ span{
background: #df01d7;
color: #fff;
box-shadow: 0 2px 20px #df01d7;
}
.container div:nth-child(6n + 4) label input[type="checkbox"]:checked ~ span{
background: #2e2efe;
color: #fff;
box-shadow: 0 2px 20px #2e2efe;
}
.container div:nth-child(6n + 5) label input[type="checkbox"]:checked ~ span{
background: #cebb0f;
color: #fff;
box-shadow: 0 2px 20px #cebb0f;
}
.container div:nth-child(6n + 6) label input[type="checkbox"]:checked ~ span{
background: #00c3ff;
color: #fff;
box-shadow: 0 2px 20px #00c3ff;
}