forked from rpsthecoder/css-mask-switch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
74 lines (74 loc) · 1.59 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
70
71
72
73
74
#outerWrapper{
width: 450px;
height: 90px;
padding: 10px;
margin: 50px auto 0 auto;
border-radius: 55px;
box-shadow: 0 0 10px 6px #EAEBED;
background: #fff;
}
#innerWrapper{
height: 100%;
border-radius: 45px;
overflow: hidden;
position: relative;
}
.radio{
width: 90px;
height: 100%;
position: absolute;
margin: 0;
}
#rightRadio,
#leftRadio:checked~#switchBtnOutline{
right: 0;
}
#switchBtnOutline{
width: 90px;
height: 100%;
border-radius: 45px;
box-shadow:0 0 2px 2px grey inset, 0 0 10px grey;
pointer-events: none;
position: absolute;
margin: 0;
}
.radio:not(:checked){
cursor: pointer;
}
.skin{
width: 100%;
height: 100%;
pointer-events: none;
position: absolute;
margin: 0;
}
#daySkin{
background-image: url('day.png');
}
#nightSkin{
background-image: url('night.png');
/* for firefox */
mask:url(.#leftSwitchMask);
/* for webkit */
-webkit-mask-image: radial-gradient(circle at 45px 45px , rgba(0,0,0,0) 45px, rgba(0,0,0,1) 45px);
}
#leftRadio:checked~#nightSkin{
/* for firefox */
mask:url(.#rightSwitchMask);
/* for webkit */
-webkit-mask-image: radial-gradient(circle at 405px 45px, rgba(0,0,0,1) 45px, rgba(0,0,0,0) 45px);
}
.misc{
width: 450px;
margin: auto;
font-size: 9pt;
font-family: "bookman old style";
}
h2{
width: 450px;
margin: auto;
font-family: "bookman old style";
}
a:link {
color: #0095DD;
}