-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
118 lines (113 loc) · 2.17 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
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
/* font-family: 'Montserrat', sans-serif;
font-family: 'Pacifico', cursive; */
* {
margin: 0;
padding: 0;
}
body {
font-family: "Montserrat", sans-serif;
overflow-x: hidden;
}
/* navbar */
nav {
display: flex;
background-color: rgb(180, 78, 232);
justify-content: space-around;
/* padding: 20px 0; */
color: rgb(233, 202, 248);
height: 50px;
align-items: center;
}
nav .logo {
font-family: "Pacifico", cursive;
letter-spacing: 2px;
}
nav ul {
display: flex;
list-style: none;
width: 40%;
justify-content: space-between;
}
nav ul li a {
color: rgb(233, 202, 248);
text-decoration: none;
font-size: 0.8em;
}
nav ul li a:hover {
color: rgb(250, 240, 255);
}
/* hamburger menu */
.menu-toggle {
display: none;
flex-direction: column;
height: 20px;
justify-content: space-between;
position: relative;
}
.menu-toggle input {
position: absolute;
width: 40px;
height: 28px;
left: -6px;
opacity: 0;
cursor: pointer;
z-index: 2;
}
.menu-toggle span {
display: block;
width: 28px;
height: 3px;
background-color: rgb(233, 202, 248);
border-radius: 3px;
transition: all 0.5s;
}
/* hamburger menu animation */
.menu-toggle span:nth-child(2) {
transform-origin: 0 0;
}
.menu-toggle span:nth-child(4) {
transform-origin: 0 100%;
}
.menu-toggle input:checked ~ span:nth-child(2) {
background-color: white;
transform: rotate(45deg) translate(-1px, -1px);
}
.menu-toggle input:checked ~ span:nth-child(4) {
background-color: white;
transform: rotate(-45deg) translate(-1px, 0);
}
.menu-toggle input:checked ~ span:nth-child(3) {
opacity: 0;
transform: scale(0);
}
/* ukuran tablet */
@media screen and (max-width: 768px) {
nav ul {
width: 50%;
}
}
/* ukuran mobile */
@media screen and (max-width: 576px) {
.menu-toggle {
display: flex;
}
nav ul {
position: absolute;
right: 0;
top: 0;
width: 80%;
height: 100vh;
justify-content: space-evenly;
flex-direction: column;
align-items: center;
background-color: rgb(180, 78, 232);
z-index: -1;
transform: translateX(100%);
transition: all 1s;
opacity: 0;
}
nav ul.slide {
opacity: 1;
transform: translateX(0);
}
}