Skip to content

Instantly share code, notes, and snippets.

Created August 15, 2016 05:50
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save CodeMyUI/3f5fd105373759df7b172003d61c7455 to your computer and use it in GitHub Desktop.
Pure CSS Slide Out Menu
<div class="menu">
<div class="title">MENU</div>
<ul class="nav">
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Work</a></li>
<li><a href="#">Resources</a></li>
<li><a href="#">Contact</a></li>
<div class="intro">
Hover over the menu. Thanks for visiting homie.
@mixin vertical-align($position) {
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
@mixin all-transition($time)
transition: all $time;
-webkit-transition: all $time;
margin: 0;
font-family: 'Muli', sans-serif;
.menu {
font-weight: 100;
background: #efefef;
width: 150px;
height: 100%;
padding-left: 50px;
position: fixed;
z-index: 100;
-webkit-box-shadow: -3px 0px 5px 0px rgba(0,0,0,0.2);
box-shadow: -3px 0px 5px 0px rgba(0,0,0,0.2);
right: -130px;
@include all-transition(0.3s);
color: #222;
&:hover, &:focus
transform: translate3d(-130px, 0, 0);
animation-timing-function: 1s ease-in;
@include vertical-align(absolute);
transform: rotate(270deg);
left: 10px;
font-weight: 800;
font-size: 15px;
@include vertical-align(absolute);
font-weight: 100;
padding-bottom: 30px;
list-style-type: none;
display: block;
text-decoration: none;
color: inherit;
@include all-transition(0.3s);
color: #aaa;
position: absolute;
width: 45%;
margin: 0 auto;left:0;right:0;
font-size: 45px;
text-align: center;
font-style: italic;
<link href=",300italic,300" rel="stylesheet" />
Copy link

This navigation is awesome on desktop but isn't working on mobile. Do I need a media query?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment