-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
executable file
·69 lines (59 loc) · 1.42 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
body{
margin: 50px;
}
.checkbox-switch__input, .checkbox-switch__input:checked {
display: none;
}
.checkbox-switch__input + .checkbox-switch__label:before {
content: "";
}
.checkbox-switch__input + .checkbox-switch__label:after {
display: block;
height: 40px;
width: 40px;
position: absolute;
content: "";
margin-top: -1px;
}
.checkbox-switch__label {
text-align: center;
}
.checkbox-switch__input + .checkbox-switch__label {
position: absolute;
width: 90px;
height: 40px;
background-color: #dddddd;
border-radius: 60px;
}
.checkbox-switch__input + .checkbox-switch__label > .checkbox-switch__label--on {
opacity: 0;
line-height: 40px;
position: absolute;
margin-left: 10px;
}
.checkbox-switch__input + .checkbox-switch__label > .checkbox-switch__label--off {
opacity: 1;
float: right;
line-height: 40px;
margin-right: 10px;
}
.checkbox-switch__input + label:after {
width: 34px;
margin-top: -35px;
background-color: white;
border-radius: 100%;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
transition: margin 0.4s;
}
.checkbox-switch__input:checked + .checkbox-switch__label {
background-color: green;
}
.checkbox-switch__input:checked + .checkbox-switch__label > .checkbox-switch__label--on {
opacity: 1;
}
.checkbox-switch__input:checked + .checkbox-switch__label > .checkbox-switch__label--off {
opacity: 0;
}
input.checkbox-switch__input:checked + label:after {
margin-left: 50px;
}