scrimba
UI Design
Navigations
Animating the Mobile Menu
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Animating the Mobile Menu
AboutCommentsNotes
Animating the Mobile Menu
Expand for more info
index.css
run
preview
console
@import url('https://fonts.googleapis.com/css?family=Nunito+Sans:400,700&display=swap');

html, body {
margin: 0;
padding: 0;
}

body {
font-family: 'Nunito';
height: 100vh;
}

header {
background: #3D5262;
display: flex;
justify-content: space-between;
overflow: hidden;
}

a.logo {
color: white;
text-decoration: none;
font-weight: bold;
margin: 1em .5em 0;
}

nav {
position: fixed;
top: 0;
right: 0;
height: 100vh;
background: #1D2226;
width: 66%;
visibility: hidden;
}

.exit {
width: 2em;
float: right;
margin: .5em;
cursor: pointer;
}

ul {
list-style-type: none;
padding: 0;
margin-top: 4em;
}

li a {
color: #7B8994;
text-decoration: none;
display: block;
padding: .5em 1em;
}

.open {
cursor: pointer;
margin: .5em;
}

.active a {
color: #008AF8;
font-weight: bold;
}

li a:hover {
background: #2E363D;
}

.open-nav {
visibility: unset;
}

@media (min-width: 500px) {
.open, .exit {
display: none;
}

nav {
visibility: unset;
background: none;
position: unset;
height: auto;
}

ul {
display: flex;
margin-top: auto;
width: auto;
float: right;
margin: 0;
}

li a {
color: #ADDBFF;
display: block;
padding: 1em;
}

.active a {
color: white;
}


}
Console
/index.html
-2:25