-
Notifications
You must be signed in to change notification settings - Fork 0
/
iToggle.css
57 lines (52 loc) · 1.13 KB
/
iToggle.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
input[type="checkbox"].itoggle {
max-height: 0;
max-width: 0;
opacity: 0;
}
input[type="checkbox"].itoggle + label {
display: block;
cursor: pointer;
position: relative;
box-shadow: inset 0 0 0px 1px #d5d5d5;
text-indent: -5000px;
height: 20px;
width: 35px;
border-radius: 15px;
}
input[type="checkbox"].itoggle + label:before {
content: "";
position: absolute;
display: block;
height: 20px;
width: 35px;
top: 0;
left: 0;
border-radius: 50px;
background: #c2c7cc;
transition: .25s ease-in-out;
-webkit-transition: .25s ease-in-out;
-moz-transition: .25s ease-in-out;
}
input[type="checkbox"].itoggle + label:after {
content: "";
position: absolute;
display: block;
width: 17px;
top: 1px;
left: 1px;
bottom: 1px;
border-radius: 8px;
background: #fafafa;
-webkit-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.25);
box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.25);
transition: .25s ease-in-out;
-webkit-transition: .25s ease-in-out;
-moz-transition: .25s ease-in-out;
}
input[type="checkbox"].itoggle:checked + label:before {
width: 35px;
background: #53d76a;
}
input[type="checkbox"].itoggle:checked + label:after {
left: 16px;
}