-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.css
95 lines (84 loc) · 1.6 KB
/
index.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
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: sans-serif;
}
nav {
width: 100%;
height: 70px;
display: flex;
justify-content: space-between;
align-items: center;
padding-inline: 3em;
position: fixed;
top: 0;
left: 0;
}
nav ul {
display: flex;
gap: 2em;
list-style: none;
}
nav ul li {
opacity: .8;
cursor: pointer;
}
nav ul li:hover {
opacity: 1;
}
nav button {
position: relative;
width: 25px;
height: 25px;
background: transparent;
outline: none;
border: none;
}
nav button span {
width: 100%;
height: 5px;
background: black;
position: absolute;
border-radius: 1em;
transition: .3s;
}
nav button span:nth-of-type(1) {
top: 0;
left: 0;
box-shadow: 0px 10px 0 black;
}
nav button span:nth-of-type(2) {
bottom: 0;
left: 0;
}
@media (min-width: 768px) {
nav button {
display: none;
}
}
@media (max-width: 768px) {
nav ul {
position: absolute;
top: 70px;
right: 0;
width: 100%;
height: calc(100vh - 70px);
background: #ccc;
flex-direction: column;
align-items: flex-end;
padding: 2em 5em;
transform: translateX(100%);
transition: .3s;
}
nav button:focus ~ ul {
transform: translateX(0%);
}
nav button:focus span {
box-shadow: none;
transform: rotate(40deg) translateY(13px);
}
nav button:focus span:nth-of-type(2) {
transform: rotate(-40deg) translateY(-13px);
}
}