Created
October 5, 2019 04:20
-
-
Save davidcp90/f3259a55676767d6f9ea30872cfa9986 to your computer and use it in GitHub Desktop.
HamburguerReact
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#menu { | |
width: 100%; | |
display: flex; | |
align-items: center; | |
justify-content: space-between; | |
padding: 8px; | |
} | |
#lista { | |
display: flex; | |
align-items: center; | |
justify-content: space-around; | |
list-style-type: none; | |
} | |
#lista li { | |
font-size: 16px; | |
padding: 8px; | |
height: 100%; | |
cursor: pointer; | |
transition: all 0.375s ease-in; | |
} | |
#lista li:hover { | |
background: #ff5566; | |
} | |
#button-icon, #logo { | |
width: 48px; | |
height: 48px; | |
background: transparent; | |
border: none; | |
} | |
#button-icon, #drawer, #overlay { | |
display: none; | |
} | |
#button-icon img { | |
width: 48px; | |
height: 48px; | |
} | |
#overlay { | |
display: block; | |
position: fixed; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100vh; | |
background: rgba(0,0,0,0.6); | |
transition: all 0.3s ease-out; | |
z-index: 1; | |
} | |
@media screen and (max-width: 768px) { | |
#button-icon { | |
display: block; | |
cursor: pointer; | |
} | |
#lista { | |
display: none; | |
} | |
#drawer { | |
display: block; | |
width: 200px; | |
height: 100vh; | |
background: white; | |
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.7); | |
position: fixed; | |
top: 0; | |
right: -200px; | |
transition: all 0.5s ease-in; | |
z-index: 10; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment