Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="site-wrap">

<nav>
  <ul>
    <li><a href="#">Home</a></li> 
    <li><a href="#">About</a></li> 
    <li><a href="#">Services</a></li>
    <li><a href="#">Contact</a></li> 
  </ul>
</nav>

<div class="push-wrap">

<article>
  <a href="#" class="toggle-nav"><i class="fa fa-bars"></i></a>
  <div class="container">
    <div class="row">
      <div class="col-md-12">
        
        <h1>Reveal Nav Demo <i class="fa fa-heart"></i> Scotch</h1>
        <p>Hey Tony! I like the things you do! Hey Tony! If I could I would be you! You're my one and only tiger, with my one and only taste! You know how to take a breakfast and make it mmm great! Frosted Flakes! They're more than good, they're great!</p>

        <p>Green Acres is the place to be. Farm livin' is the life for me. Land spreadin' out so far and wide. Keep Manhattan, just give me that countryside. New York is where I'd rather stay. I get allergic smelling hay. I just adore a penthouse view. Darling I love you but give me Park Avenue. The chores! The stores! Fresh air! Times Square! You are my wife. Good bye, city life. Green Acres we are there!</p>

        <p>Gathered together from the cosmic reaches of the universe, here in this great Hall of Justice, are the most powerful forces of good ever assembled: Superman! Batman and Robin! Wonder Woman! Aquaman! And The Wonder Twins: Zan and Jayna, with their space monkey, Gleek! Dedicated to prove justice and peace for all mankind!</p>

        <p>Hey Tony! I like the things you do! Hey Tony! If I could I would be you! You're my one and only tiger, with my one and only taste! You know how to take a breakfast and make it mmm great! Frosted Flakes! They're more than good, they're great!</p>

        <p>Green Acres is the place to be. Farm livin' is the life for me. Land spreadin' out so far and wide. Keep Manhattan, just give me that countryside. New York is where I'd rather stay. I get allergic smelling hay. I just adore a penthouse view. Darling I love you but give me Park Avenue. The chores! The stores! Fresh air! Times Square! You are my wife. Good bye, city life. Green Acres we are there!</p>

        <p>Gathered together from the cosmic reaches of the universe, here in this great Hall of Justice, are the most powerful forces of good ever assembled: Superman! Batman and Robin! Wonder Woman! Aquaman! And The Wonder Twins: Zan and Jayna, with their space monkey, Gleek! Dedicated to prove justice and peace for all mankind!</p>

        <p>Hey Tony! I like the things you do! Hey Tony! If I could I would be you! You're my one and only tiger, with my one and only taste! You know how to take a breakfast and make it mmm great! Frosted Flakes! They're more than good, they're great!</p>

        <p>Green Acres is the place to be. Farm livin' is the life for me. Land spreadin' out so far and wide. Keep Manhattan, just give me that countryside. New York is where I'd rather stay. I get allergic smelling hay. I just adore a penthouse view. Darling I love you but give me Park Avenue. The chores! The stores! Fresh air! Times Square! You are my wife. Good bye, city life. Green Acres we are there!</p>

        <p>Gathered together from the cosmic reaches of the universe, here in this great Hall of Justice, are the most powerful forces of good ever assembled: Superman! Batman and Robin! Wonder Woman! Aquaman! And The Wonder Twins: Zan and Jayna, with their space monkey, Gleek! Dedicated to prove justice and peace for all mankind!</p>


      </div>
    </div>
  </div>
</article>
  
</div>
  
</div>
              
            
!

CSS

              
                /* IMPORTANT STUFF */
nav {
  width: 275px;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
}
.site-wrap {
  overflow: hidden;
  width: 100%;
  height: 100%;
}
.push-wrap {
  -webkit-transition: all 300ms ease 0;
  -moz-transition: all 300ms ease 0;
  -o-transition: all 300ms ease 0;
  transition: all 300ms ease 0;
  
  -webkit-transform: translate(0, 0);
  -moz-transform: translate(0, 0);
  -ms-transform: translate(0, 0);
  -o-transform: translate(0, 0);
  transform: translate(0, 0);
  
  -webkit-transform: translate3d(0, 0, 0);
  -moz-transform: translate3d(0, 0, 0);
  -ms-transform: translate3d(0, 0, 0);
  -o-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}
.show-nav .push-wrap {
  -webkit-transform: translate(275px, 0);
  -moz-transform: translate(275px, 0);
  -ms-transform: translate(275px, 0);
  -o-transform: translate(275px, 0);
  transform: translate(275px, 0);
  
  -webkit-transform: translate3d(275px, 0, 0);
  -moz-transform: translate3d(275px, 0, 0);
  -ms-transform: translate3d(275px, 0, 0);
  -o-transform: translate3d(275px, 0, 0);
  transform: translate3d(275px, 0, 0);
}



/* BASE CSS */
body {
  background: #e3e3e3;
}
a {
  transition: all 300ms ease;
}
nav {
  background: #2b343f;
  text-align: center;
  -webkit-box-shadow: inset -1.5em 0 1.5em -0.75em rgba(0, 0, 0, 0.5);
  -moz-box-shadow: inset -1.5em 0 1.5em -0.75em rgba(0, 0, 0, 0.5);
  box-shadow: inset -1.5em 0 1.5em -0.75em rgba(0, 0, 0, 0.5);
}
nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
nav ul li a {
  display: block;
  text-decoration: none !important;
  height: 60px;
  line-height: 60px;
  font-size: 18px;
  color: #fff;
}
nav ul li a:hover {
  background: #4EFFFF;
  color: #000;
}
article {
  position: relative;
  min-height: 1500px;
  background: #e3e3e3;
  z-index: 9;
  width: 100%;
}
article h1 {
  text-align: center;
  margin: 40px 0 30px;
}
article p {
  font-size: 20px;
  line-height: 30px;
  margin-bottom: 40px;
}
article a.toggle-nav {
  position: absolute;
  font-size: 25px;
  color: rgb(255, 139, 139);
  top: 0;
  left: 0;
  background: #444;
  width: 60px;
  height: 60px;
  line-height: 60px;
  text-align: center;
}
article a.toggle-nav:hover {
  color: red; 
}
i {
  color: pink;
}
              
            
!

JS

              
                // Normal Clicks
$(function() {
  $('.toggle-nav').click(function() {
    $('body').toggleClass('show-nav');
     return false;
  });
  
});


// Toggle with hitting of ESC
$(document).keyup(function(e) {
	if (e.keyCode == 27) {
   $('body').toggleClass('show-nav');
  }
});
              
            
!
999px

Console