-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathtoggleswitch.css
49 lines (48 loc) · 1001 Bytes
/
toggleswitch.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
/*
Title: Toggle Switch
URL: http://github.com/jamiebicknell/Toggle-Switch
Author: Jamie Bicknell
Twitter: @jamiebicknell
*/
.switch {
position:relative;
width:37px;
height:16px;
overflow:hidden;
cursor:pointer;
}
.switch .overlay {
position:absolute;
top:0;
left:0;
width:37px;
height:16px;
background:url('./overlay.png') no-repeat 0 0;
z-index:9;
}
.switch span.switched {
display:block;
position:absolute;
top:0;
left:0;
width:58px;
height:16px;
background:#d9d9d9 url('./switch.gif') no-repeat 0 0;
z-index:8;
}
.switch span.off {
left:-21px;
}
.switch input {
display:none;
}
@media only screen and (-webkit-min-device-pixel-ratio: 2) {
.switch .overlay {
background:url('./[email protected]') no-repeat 0 0;
background-size:37px 16px;
}
.switch span.switched {
background:url('./[email protected]') no-repeat 0 0;
background-size:58px 16px;
}
}