forked from kish-an/cs50
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshared.css
105 lines (89 loc) · 1.71 KB
/
shared.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
body {
background-color: black;
color: white;
box-sizing: border-box;
}
.active {
color: rgba(255,255,255,0.5);
}
header {
position: fixed;
width: 100%;
height: 80px;
top: 0;
left: 0;
z-index: 10;
transition: height 0.6s ease-out;
}
nav {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem 2.5rem;
background: rgba(0,0,0,0.8);
border-radius: 5px;
}
nav a {
text-decoration: none;
color: white;
display: inline-block;
-webkit-transition: transform 0.3s ease-out;
-moz-transition: transform 0.3s ease-out;
-ms-transition: transform 0.3s ease-out;
-o-transition: transform 0.3s ease-out;
transition: transform 0.3s ease-out;
}
nav a:hover {
color: inherit;
text-decoration: none;
transform: translateY(-10%);
}
.navbar__logo {
font-family: 'Montserrat';
font-weight: 700;
font-size: 2rem;
}
.navbar__links a {
margin: 0 1rem;
}
main {
margin-top: 7.5rem;
}
.hamburger-menu {
display: none;
}
.hamburger-menu--line {
width: 1.5rem;
height: 0.2rem;
background-color: white;
margin: 4px 0;
border-radius: 3px;
}
header.mobile__nav {
z-index: 50;
background: black;
height: 100vh;
}
.navbar__links.mobile__nav {
display: flex;
flex-direction: column;
justify-content: space-around;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 2rem;
text-align: center;
}
.navbar__links.mobile__nav a {
margin: 2rem 0;
}
@media (max-width: 480px) {
.hamburger-menu {
display: inline-block;
cursor: pointer;
}
.navbar__links {
display: none;
}
}