-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.scss
129 lines (121 loc) · 2.4 KB
/
main.scss
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
@import url('https://fonts.googleapis.com/css?family=Poppins&display=swap');
body,
html {
font-family: 'Poppins';
margin: 0;
a {
text-decoration: none;
}
}
header {
padding: 2em;
.logo {
color: black;
font-size: 2vw;
font-weight: bold;
}
.menu-btn {
float: right;
cursor: pointer;
}
}
section {
padding: 4em;
h1 {
font-size: 4em;
margin: 1em auto;
width: 80%;
}
&::before {
content: ' ';
border-top: 8px solid rgb(180, 180, 180);
display: block;
}
}
nav {
position: absolute;
background: black;
padding: 2em;
width: calc(100% - 4em);
height: calc(100vh - 4em);
display: none;
transform: scaleX(0);
transform-origin: right;
.close-btn {
float: right;
cursor: pointer;
opacity: 0;
}
ul {
list-style-type: none;
margin: 10% auto 0 auto;
padding: 0;
display: grid;
grid-template-columns: repeat(3, auto);
width: 80%;
a {
color: white;
font-weight: bold;
font-size: 2em;
}
span {
color: gray;
display: block;
font-size: 1em;
margin-top: 20px;
}
li {
opacity: 0;
}
}
}
.show-menu {
display: block;
animation: slide-menu 1s ease-in forwards;
.close-btn {
animation: show-x 1s 1s ease-in forwards;
}
li:nth-of-type(1) {
animation: menu-item-anim 0.6s 1s ease-in-out forwards;
}
li:nth-of-type(2) {
animation: menu-item-anim 0.6s 1.2s ease-in-out forwards;
}
li:nth-of-type(3) {
animation: menu-item-anim 0.6s 1.4s ease-in-out forwards;
}
}
@keyframes slide-menu {
from {
transform: scaleX(0);
}
to {
transform: scaleX(1);
}
}
@keyframes show-x {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes menu-item-anim {
from {
transform: translateY(90%);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
@keyframes slide-menu-out {
from {
transform: scaleX(1);
}
to {
transform: scaleX(0);
}
}