Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<div class="screen"><div class="content">
  <input type="checkbox" class="check" id="check" />
  <div class="menu">
    <label for="check" class="btn"><i class="fa fa-bars"></i></label>
    <ul>
      <li><a href="#"><i class="fa fa-globe"></i>About</a></li>
      <li><a href="#"><i class="fa fa-desktop"></i>Product</a></li>
      <li><a href="#"><i class="fa fa-camera"></i>Gallery</a></li>
      <li><a href="#"><i class="fa fa-users"></i>Support</a></li>
    </ul>
  </div>
  <label for="check" class="cbtn"></label>
  <div class="contentBody">
    <h1>Dummy Text</h1>
    <p>
    Natoque facilisi diam quisque aliquam posuere. Pede dolor suspendisse faucibus, primis mi vivamus sagittis mauris tempor torquent, molestie lectus. Leo. Aptent tellus mi mauris Malesuada aenean lectus bibendum.
    </p>
    <p>
    Hac nullam. Integer integer. Facilisi donec. Venenatis Non consequat, cum accumsan. Luctus pulvinar non hendrerit per fames quis.
    </p>
    <p>
    Euismod massa aliquam diam vulputate consectetuer nostra, bibendum auctor ante. Quam. Gravida diam lobortis sapien sociis justo. Tristique augue vehicula sem condimentum euismod ornare.
    </p>
    <p>
    Et sodales elit conubia venenatis sagittis penatibus malesuada. Habitant ligula turpis nisi nulla lacus sagittis leo lorem orci torquent pulvinar rutrum habitant diam dis nibh nibh velit enim ante scelerisque.
    </p>
  </div>
  </div></div>
              
            
!

CSS

              
                @import "compass/css3";

body {
  background-color: #666;
}
.screen {
  poisition: relative;
  width: 320px;
  height: 100%;
  margin: 0 auto;
  background-color: #fff;
  overflow: hidden;
  box-shadow:0 2px 10px rgba(#000,.5);
  @include box-sizing(border-box);
}
.content {
  position: relative;
}
.check {
  display: none;
}
$menuWidth: 250px;
.menu {
  position: absolute;
  top: 0;
  left: -$menuWidth;
  z-index:2;
  @include transition(.3s);
  animation: 2s demo 1;
  -webkit-animation: 2s demo 1;

  .btn {
    float: right;
    display: block;
    width: 40px;
    line-height: 40px;
    font-size: 24px;
    background: #333;
    color: #fff;
    text-align: center;
    cursor: pointer;
  }
  .btn:hover {
    background: #666;
  }
  ul {
    display: block;
    float:left;
     z-index: 1;
    left: -$menuWidth;
    display: block;
    background: #333;
    margin: 0;
    padding: 0;
    width:$menuWidth;
  }
  li {
    list-style: none;
    a {
      display: block;
      padding:0 10px;
      height: 40px;
      line-height: 40px;
      color: #fff;
      text-decoration: none;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    a:hover {
      background: #666;
    }
    i {
      width: 20px;
      margin-right: 10px;
      text-align: center;
    }
  }
}
.check:checked ~ .menu {
  left:0px;
}
.cbtn {
  display: none;
  position:absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: rgba(#000,.5);
  z-index: 1;
}
.check:checked ~ .cbtn {
  display: block;
}
.contentBody {
  padding: 10px;
}
.check:checked ~ .contentBody {
  -webkit-filter: blur(1px);
  filter: blur(1px);
}

h1 {
  text-align: center;
}

@keyframes demo {
  0% {left: -$menuWidth;}
  20% {left: 0;}
  80% {left: 0;}
  100% {left: -$menuWidth;}
}
@-webkit-keyframes demo {
  0% {left: -$menuWidth;}
  20% {left: 0;}
  80% {left: 0;}
  100% {left: -$menuWidth;}
}
              
            
!

JS

              
                
              
            
!
999px

Console