Skip to content

Instantly share code, notes, and snippets.

@jthigh
Forked from elijahmanor/CSS-Hamburger-Icon.markdown
Last active August 29, 2015 14:24
Show Gist options
  • Save jthigh/1c9f12ec8bed39df6283 to your computer and use it in GitHub Desktop.
Save jthigh/1c9f12ec8bed39df6283 to your computer and use it in GitHub Desktop.
<a id="nav-toggle" href="#"><span></span></a>
#nav-toggle span, #nav-toggle span:before, #nav-toggle span:after {
cursor: pointer;
border-radius: 1px;
height: 5px;
width: 35px;
background: white;
position: absolute;
display: block;
content: '';
}
#nav-toggle span:before {
top: -10px;
}
#nav-toggle span:after {
bottom: -10px;
}
#nav-toggle span {
&, &:before, &:after {
cursor: pointer;
-webkit-border-radius: 1px;
border-radius: 1px;
height: 5px;
width: 35px;
background: white;
position: absolute;
display: block;
content: '';
}
&:before {
top: -10px;
}
&:after {
bottom: -10px;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment