-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtoggle_switch.css
More file actions
48 lines (45 loc) · 921 Bytes
/
toggle_switch.css
File metadata and controls
48 lines (45 loc) · 921 Bytes
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
.toggle {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
margin: 0;
width: 62px;
height: 32px;
display: inline-block;
position: relative;
border-radius: 50px;
overflow: hidden;
outline: none;
border: none;
cursor: pointer;
background-color: #707070;
transition: background-color ease 0.3s;
}
.toggle:before {
content: "";
display: block;
position: absolute;
z-index: 2;
width: 28px;
height: 28px;
background: #fff;
left: 2px;
top: 2px;
border-radius: 50%;
font: 10px/28px Helvetica;
text-transform: uppercase;
font-weight: bold;
text-indent: -22px;
word-spacing: 37px;
color: #fff;
text-shadow: -1px -1px rgba(0,0,0,0.15);
white-space: nowrap;
box-shadow: 0 1px 2px rgba(0,0,0,0.2);
transition: all cubic-bezier(0.3, 1.5, 0.7, 1) 0.3s;
}
.toggle:checked {
background-color: #f76902;
}
.toggle:checked:before {
left: 32px;
}