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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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.

Editor Settings

Code Indentation

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

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

            
              .l-site
  .l-nav
    nav.nav
      ul
        li.nav-primary
          a(href="#") Home
        li.nav-primary
          a(href="#") Approach
        li.nav-primary
          a(href="#") Work
        li.nav-primary
          a(href="#") People
        li.nav-secondary
          a(href="#") Jobs
        li.nav-secondary
          a(href="#") Blog
        li.nav-secondary
          a(href="#") Contact
  .l-page
    .menu
      .menu-hamburger
    section.band.band-a
      .band-container
        .band-inner
          h1 Lorem ipsum dolor
          p Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut porta, tellus ut convallis luctus, lorem diam mattis arcu, eu consequat dui tortor eget lacus. Donec metus ligula, rutrum volutpat neque vel, porta tincidunt dui. Phasellus convallis tristique nunc. Integer nunc nunc, finibus a maximus at, viverra ut lorem. Etiam id velit risus. Vestibulum sapien mauris, fermentum nec luctus nec, fringilla non orci. Nullam blandit porta tincidunt. Donec placerat pretium dapibus. Ut interdum lorem eu nibh tincidunt vulputate. Aenean aliquam gravida quam, vel pulvinar odio. Pellentesque sed feugiat ligula. Quisque sagittis porttitor dui, ac lacinia mauris tempor vel. Donec rutrum lorem id nulla consequat vulputate.

    section.band.band-b
      .band-container
        .band-inner
          h1 Proin sed aliquet
          p Proin sed aliquet tellus. Etiam bibendum ligula in rhoncus imperdiet. Sed a sollicitudin dolor. Integer leo enim, tincidunt vel sagittis vel, vehicula non quam. Nunc mattis bibendum massa vel volutpat. Duis ligula ante, elementum luctus felis ut, ultricies aliquam dolor. Nunc et est mattis, fermentum nisl et, volutpat lacus. Nam ullamcorper urna non odio luctus volutpat. Praesent efficitur in risus at porttitor.

    section.band.band-c
      .band-container
        .band-inner
          h1 Sed consectetur neque
          p Sed consectetur neque et libero placerat, dapibus laoreet sem condimentum. Nunc suscipit pharetra nunc ac interdum. Quisque justo magna, porttitor quis bibendum eu, ultrices nec justo. Cras mattis ut lectus at ullamcorper. Mauris vestibulum est sed sapien euismod, a pretium arcu lacinia. Donec pharetra non massa ac rhoncus. In in magna felis. Ut porta nec nunc a condimentum. Nullam ultricies sollicitudin enim ac scelerisque. Nam porta, leo in euismod suscipit, elit lorem eleifend neque, non hendrerit quam odio quis felis. Praesent id ullamcorper neque, in fermentum mauris. Curabitur sodales erat sed nisi dictum, sit amet vehicula eros malesuada.

    section.band.band-d
      .band-container
        .band-inner
          h1 Nulla tempor laoreet
          p Nulla tempor laoreet sagittis. Donec molestie odio sit amet tincidunt egestas. Ut ut nisi nec felis vehicula pharetra. Nunc ullamcorper vitae lectus vitae consectetur. Quisque pharetra lorem metus, at lacinia magna malesuada non. Maecenas tristique risus quis massa convallis tempus in non turpis. Mauris pretium purus sed lacus euismod, eu cursus massa commodo. Nulla in erat ut ex imperdiet iaculis. Aliquam erat volutpat. Sed pellentesque et neque vitae accumsan. Etiam nec dolor quis est dignissim viverra. Nunc et pulvinar felis. Nulla in varius turpis. Curabitur non diam libero. Nam porttitor orci in metus sagittis

            
          
!

CSS

            
              @import "bourbon";

$break-medium: 980px;
$nav-width: 240px;
$site-width: 1600px;

@import url(https://fonts.googleapis.com/css?family=Open+Sans:700,300,600,800,400);

html,
body {
  margin: 0;
  padding: 0;
  background: lighten(#3a4043, 15%);
  font-family: 'Open Sans', sans-serif;
}

.l-site {
  margin: 0 auto;
  max-width: $site-width;
  position: relative;
  z-index: 1;
  
  &:before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 50%;
    display: block;
    background: #3a4043;
    z-index: 1;
  }
}

.l-page {
  position: relative;
  margin-left: $nav-width;
  background: #fff;
  z-index: 2;
  box-shadow: 1px 0 25px rgba(0,0,0,0.25);
  @include transition(0.35s);
}

.l-nav {
  position: absolute;
  width: $nav-width;
  display: block;
  background: #3a4043;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
}

.band {
  h1 {
    margin: 0;
    padding: 0 0 10px;
    color: #fff;
    font-size: 32px;
  }
  
  p {
    margin: 0;
    padding: 0;
    color: #fff;
    font-size: 17px;
  }
}

.band-container {
  left: 0;
  right: 0;
  margin: 0 auto;
  min-height: 85vh;
  max-width: 960px;
  display: table;
  position: relative;
  padding: 0 3em;
}

.band-inner {
  display: table-cell;
  vertical-align: middle;
  padding: 3em 0 4em;
}

.band-a {
  background: #69D2E7;
}

.band-b {
  background: #F9D423;
}

.band-c {
  background: #F38630;
}

.band-d {
  background: #FF4E50;
}

.nav {
  width: ($nav-width - 60);
  position: fixed;
  top: 0;
  bottom: 0;
  margin: 0;
  padding: 30px;
  overflow: auto;
  
  ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }
  
  li {
    margin: 0;
    padding: 0;
    @include transition(0.25s);
  }
  
  a {
    color: #fff;
    text-decoration: none;
    font-size: 20px;
    font-weight: 800;
    display: block;
    padding: 10px 0;
  }
  
  .nav-primary {
    opacity: 1;
    
    &:hover {
      opacity: 0.7;
    }
  }
  
  .nav-secondary {
    opacity: 0.4;
    
    &:hover {
      opacity: 0.7;
    }
  }
}

.menu {
  display: none;
  position: fixed;
  top: 25px;
  left: 1.5em;
  width: 24px;
  height: 24px;
  cursor: pointer;
  z-index: 10;
  
  &:hover {
    .menu-hamburger:before,
    .menu-hamburger:after {
      width: 24px;
    }
  }
  
  &.is-active {
    .menu-hamburger {
      background: none;
    }
    .menu-hamburger:before,
    .menu-hamburger:after {
      top: 0;
      width: 24px;
      -webkit-transform: rotate(45deg);
          -ms-transform: rotate(45deg);
              transform: rotate(45deg);
    }
    .menu-hamburger:after {
      -webkit-transform: rotate(-45deg);
          -ms-transform: rotate(-45deg);
              transform: rotate(-45deg);
    }
    .menu-hamburger:hover {
      -webkit-transform: scale(1.2);
          -ms-transform: scale(1.2);
              transform: scale(1.2);
    }
  }
}

.menu-hamburger {
  position: relative;
  width: 24px;
  height: 4px;
  margin: 10px 0;
  background: #fff;
  border-radius: 4px;
  transition: all 300ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  &:before,
  &:after {
    content: '';
    display: block;
    width: 24px;
    height: 4px;
    background: #fff;
    position: absolute;
    border-radius: 4px;
    transition: all 300ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
  }
  &:before {
    top: -8px;
    left: 0;
    width: 22px;
  }

  &:after {
    top: 8px;
    width: 16px;
    left: 0;
  }
}

@media screen and (max-width: $break-medium) {
  .menu {
    display: block;
  }
  
  .l-site {
    &.is-open {
      overflow: hidden;
      
      .l-page {
        @include transform(translateX($nav-width));
      }
    }
  }
  
  .l-page {
    margin-left: 0;
    z-index: 3;
  }
  
  .l-nav {
    z-index: 2;
  }
  
  .band-container {
    padding: 0 1.5em;
  }
}
            
          
!

JS

            
              $('.menu').on('click', function(){
  if ($('.l-site').hasClass('is-open')) {
    $('.menu').removeClass('is-active');
  	$('.l-site').removeClass('is-open');
  } else {
    $('.menu').addClass('is-active');
  	$('.l-site').addClass('is-open');
  }
});


            
          
!
999px

Console