-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path3-styles.css
102 lines (84 loc) · 1.83 KB
/
3-styles.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/* 3-styles.css */
body {
background-color: whitesmoke;
display: flex;
justify-content: center;
align-items: center;
position: relative;
}
.menu {
display: flex;
flex-direction: column;
align-items: center;
gap: 3rem;
position: relative;
margin-top: 10rem;
}
.menu-open-button {
cursor: pointer;
width: 60px;
height: 60px;
background-color: rgb(196, 18, 18);
border-radius: 50%;
}
.menu-open-button span {
background-color: white;
height: 2px;
position: absolute;
width: 50%;
margin-top: 23px;
left: 25%;
transition: all 0.3s ease;
}
.menu-open-button span:first-child {
top: 0;
}
.menu-open-button span:nth-child(2) {
top: 6px;
}
.menu-open-button span:last-child {
top: 12px;
}
input[type="checkbox"]:checked + .menu-open-button span:nth-child(2) {
opacity: 0;
}
input[type="checkbox"]:checked + .menu-open-button span:first-child,
input[type="checkbox"]:checked + .menu-open-button span:last-child {
top: 6px;
}
input[type="checkbox"]:checked + .menu-open-button span:first-child {
transform: rotate(45deg);
}
input[type="checkbox"]:checked + .menu-open-button span:last-child {
transform: rotate(-45deg);
}
input[type="checkbox"] {
display: none;
}
.menu-item {
display: none;
}
input[type="checkbox"]:checked ~ .menu-item {
background-color: rgb(196, 18, 18);
color: white;
width: 50px;
height: 50px;
display: flex;
justify-content: center;
align-items: center;
border-radius: 50%;
}
input[type="checkbox"]:checked ~ .menu-item:hover {
background-color: white;
color: rgb(196, 18, 18);
}
.menu-open-button:hover {
width: 65px;
height: 65px;
}
.menu-open-button:hover span {
margin-top: 27px;
}
input[type="checkbox"]:checked + .menu-open-button span {
margin-top: 23px;
}