-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
78 lines (77 loc) · 1.61 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
75
76
77
78
body {
display: flex;
justify-content: center;
align-items: center;
text-align: center;
min-height: 100vh;
margin: 0;
padding: 0;
background-color: black;
color: white;
}
input{
width: 150px;
height: 80px;
margin-top: 21px;
position: absolute;
appearance: none;
transform: translate(-75px);
z-index: 1;
border-radius: 80px;
}
input:checked ~ span{
background-color: green;
box-shadow: 0px 10px 25px rgba(0, 255, 0, 20);
}
span{
display: inline-block;
width: 150px;/*150*/
height: 80px;/*80*/
border-radius: 80px;
background-color: red;
transition: 0.5s;
box-shadow: 0px 10px 25px rgba(255, 0, 0, 20);
}
label{
display: inline-block;
width: 70px;
height: 70px;
background-color: white;
border-radius: 50%;
position: absolute;
transition: 0.5s;
transform: translate(5px, 5px);
}
input:checked ~ label{
transform: translate(75px, 5px);
background-color: white;
}
label::before{
content: "";
display: inline-block;
border-radius: 50%;
width: 15px;
height: 15px;
transform: translate(-4px, 15px);
box-shadow: 34px 0px 0px red;
background-color: red;
transition: 0.5s;
}
label::after{
content: "";
display: inline-block;
width: 25px;
height: 10px;
transform: translate(-8px, 40px);
background-color: red;
transition: 0.5s;
}
input:checked ~ label::before{
box-shadow: 34px 0px 0px green;
background-color: green;
}
input:checked ~ label::after{
background-color: green;
border-bottom-left-radius: 100px;
border-bottom-right-radius: 100px;
}