Skip to content

Instantly share code, notes, and snippets.

@cziem
Created November 12, 2018 10:11
Show Gist options
  • Save cziem/1dae6f69b21bb0d22cad885c885cb448 to your computer and use it in GitHub Desktop.
Save cziem/1dae6f69b21bb0d22cad885c885cb448 to your computer and use it in GitHub Desktop.
Get the navbar in shape
nav {
display: flex;
background: #0e496b;
width: 100%;
position: relative;
}
ul {
display: flex;
list-style: none;
}
li {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
padding: 1rem 5vw;
cursor: pointer;
transition: all .4s ease-in-out;
}
li:hover {
color: aliceblue;
background: #032d46;
}
li.logo {
max-width: 0;
overflow: hidden;
background: #faf3f3;
transition: all 0.5s;
font-size: 1.3rem;
transition: all .3s ease-in-out;
transform: translateX(-150px); /* pushes the logo off the screen */
}
li.logo span {
font-weight: 600;
color: #02121b;
text-transform: capitalize;
}
li.logo:hover {
bac kground: #032d46;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment