-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
71 lines (63 loc) · 1.31 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
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@200;400;500;600;700&display=swap");
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Poppins", sans-serif;
}
html,
body {
display: grid;
height: 100%;
place-items: center;
background: #664aff;
}
.checkbox {
display: flex;
justify-content: space-between;
align-items: center;
height: 80px;
width: 270px;
padding: 20px;
background: #fff;
}
.checkbox input {
position: relative;
height: 40px;
width: 90px;
outline: none;
background: #e6e6e6;
border-radius: 50px;
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
-webkit-appearance: none;
transition: left 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
input:checked {
background: #664aff;
}
.checkbox input::before {
height: 100%;
width: 40px;
left: 0;
content: "";
background: linear-gradient(#fff, #f2f2f2, #e6e6e6, #d9d9d9);
position: absolute;
border-radius: 50px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
transform: scale(0.85);
transition: left 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
input:checked::before {
left: 50px;
}
.checkbox .text::before {
content: "Disabled";
font-size: 25px;
font-weight: 500;
color: #bfbfbf;
}
input:checked ~ .text::before {
content: "Enabled";
font-size: 26px;
color: #664aff;
}