Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save piecedigital/2a5d4d2f0d1b363640da to your computer and use it in GitHub Desktop.
Save piecedigital/2a5d4d2f0d1b363640da to your computer and use it in GitHub Desktop.
Single Div Mobile/Hamburger Menu
<header>
<span>The Single Div Mobile/Hamburger Menu</span>
<div id="mo-nav"></div>
</header>
body{
background: rgba(0,150,250,1);
margin: 0;
}
header{
position: relative;
height: 5em;
background:rgba(0,60,250,1);
}
span{
position: absolute;
vertical-align: middle;
margin: auto;
font-family: sans-serif;
font-size: 2em;
}
#mo-nav{
position: fixed;
top: .5em;
right: .5em;
background: rgba(0,150,250,1);
height: 2.5em;
width: 2.5em;
border-radius: 10px;
border: .8em solid rgba(0,60,250,1);
box-shadow: 0 0 0 .1em rgba(0,150,250,1),
inset 0 .5em 0 0 rgba(0,150,250,1),
inset 0 1em 0 0 rgba(0,60,250,1),
inset 0 1.5em 0 0 rgba(0,150,250,1),
inset 0 2em 0 0 rgba(0,60,250,1),
inset 0 2.5em 0 0 rgba(0,150,250,1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment