-
Notifications
You must be signed in to change notification settings - Fork 2
/
toggle.css
32 lines (32 loc) · 1003 Bytes
/
toggle.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
.onoffswitch {
position: relative; width: 34px;
-webkit-user-select:none; -moz-user-select:none; -ms-user-select: none;
}
.onoffswitch-checkbox {
display: none;
}
.onoffswitch-label {
display: block; overflow: hidden; cursor: pointer;
height: 16px; padding: 0; line-height: 16px;
border: 2px solid #CCCCCC; border-radius: 16px;
background-color: #DBDBDB;
transition: background-color 0.3s ease-in;
}
.onoffswitch-label:before {
content: "";
display: block; width: 16px; margin: 0px;
background: #FFFFFF;
position: absolute; top: 0; bottom: 0;
right: 16px;
border: 2px solid #CCCCCC; border-radius: 16px;
transition: all 0.3s ease-in 0s;
}
.onoffswitch-checkbox:checked + .onoffswitch-label {
background-color: #FA5F7E;
}
.onoffswitch-checkbox:checked + .onoffswitch-label, .onoffswitch-checkbox:checked + .onoffswitch-label:before {
border-color: #FA5F7E;
}
.onoffswitch-checkbox:checked + .onoffswitch-label:before {
right: 0px;
}