-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
59 lines (58 loc) · 1.41 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
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
body{
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: #2b2b2b;
/* transition: 0.5s;*/
}
body.active{
background: #f8f8f8;
}
#toggle{
height: 160px;
width: 320px;
background: #222;
appearance: none;
border-radius: 160px;
box-shadow: inset 0 8px 60px rgba(0,0,0,0.1),
inset 0 8px 8px rgba(0,0,0,0.1),
inset 0 -4px 4px rgba(0,0,0,0.1);
position: relative;
outline: none;
cursor: pointer;
transition: 0.5s;
}
#toggle.active{
background: #fff;
box-shadow: inset 0 2px 60px rgba(0,0,0,0.1),
inset 0 2px 8px rgba(0,0,0,0.1),
inset 0 -4px 8px rgba(0,0,0,0.05);
}
#toggle .checkbox{
height: 160px;
width: 160px;
position: absolute;
top: 0;
left: 0;
content: "";
background: linear-gradient(to bottom, #444, #222);
border-radius: 50%;
transform: scale(0.9);
transition: 0.5s;
box-shadow:0 8px 40px rgba(0,0,0,0.5),
inset 0 4px 4px rgba(255, 255, 255,0.2),
inset 0 -4px 4px rgba(255, 255, 255,0.2);
}
#toggle.active .checkbox{
left: 160px;
background: linear-gradient(to bottom, #eaeaea, #f9f9f9);
box-shadow:0 8px 20px rgba(0,0,0,0.1),
inset 0 4px 4px rgba(255, 255, 255,1),
inset 0 -4px 4px rgba(255, 255, 255,1);
}