-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
46 lines (40 loc) · 885 Bytes
/
style.css
File metadata and controls
46 lines (40 loc) · 885 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
:root {
--width-toggle-wrap: 100px;
--height-toggle-wrap: 40px;
--dimension-toggle: 40px;
}
* {
margin: 0;
padding: 0;
}
.container {
height: 100vh;
background-color: rgb(222, 218, 254);
display: flex;
align-items: center;
justify-content: center;
}
.toggle-wrap {
width: var(--width-toggle-wrap);
height: var(--height-toggle-wrap);
background-color: aliceblue;
border-radius: 30px;
border: 3px solid black;
padding: 3px;
cursor: pointer;
}
label{cursor: pointer;}
#toggle {
display: none;
width: 100%;
}
.toggle-switch {
width: var(--dimension-toggle);
height: var(--dimension-toggle);
background-color: black;
border-radius: 50%;
transition: transform 0.8s;
}
#toggle:checked ~ .toggle-switch {
transform: translateX(calc(var(--width-toggle-wrap) - var(--dimension-toggle)));
}