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='https://fonts.googleapis.com/css?family=Open+Sans:300|Raleway:200,900|Over+the+Rainbow' rel='stylesheet' type='text/css'>
<meta name="viewport" content="width=device-width, user-scalable=no">
  
<header>
  <div class="hero">
    <div class="hamb-wrap">
      <div class="hamb"></div>
    </div>
    <p class="logo">Bill Murray</p>
    <nav>
      <ul>
        <li>
          <a href="#">Home</a>
        </li>
        <li>
          <a href="#">CV</a>
        </li>
        <li>
          <a href="#">Blog</a>
        </li>
        <li>
          <a href="#">Contact</a>
        </li>
      </ul>
    </nav>
  </div>
</header>
<section class="content">
  <h1>Page Name</h1>
  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quisquam vitae officiis distinctio libero deleniti dolorem quae vero nemo modi cupiditate delectus quo iure pariatur nulla doloremque odio  minima beatae totam! Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsam itaque nemo cupiditate commodi velit praesentium perspiciatis nesciunt quas eveniet alias porro veritatis sit cum est necessitatibus possimus illum qui recusandae optio vel illo amet unde quidem perferendis consequatur officiis provident ex impedit repellat fuga enim eum a voluptatibus sequi voluptas soluta voluptatem corrupti minus accusamus ea accusantium laboriosam?</p>
  <img /><img src="http://placehold.it/500x500&text=Image 2" class="fr" height="250" width="250"/><p>Eum sapiente architecto natus ducimus a placeat expedita dolore debitis amet omnis excepturi pariatur libero similique nobis neque sit perferendis mollitia quibusdam corporis atque illo. Excepturi repellendus architecto voluptates numquam cum tempora natus eligendi itaque labore provident deserunt incidunt commodi iste sint rem non et sapiente nesciunt debitis sit eius ad necessitatibus sequi totam illum doloremque officia similique est minus dignissimos distinctio placeat ipsa aut illo aliquid beatae iure!</p>
  <p>Repellendus cupiditate voluptatibus eius sequi id corrupti tempore consectetur explicabo deleniti voluptate distinctio quae accusamus ipsum placeat tenetur dolorem nesciunt? Earum cum dicta libero quia qui culpa fuga nulla adipisci natus nesciunt! Impedit ut hic quisquam quos id. Dolorum eos assumenda ducimus illum quisquam doloribus culpa nisi ab amet quo quibusdam ipsa inventore vitae iste mollitia animi odio reiciendis cum non autem ea nihil nobis laborum harum recusandae error rerum facere asperiores officia cupiditate eveniet enim distinctio ex debitis nostrum obcaecati omnis. Aut ex recusandae sapiente saepe deserunt omnis quasi consequuntur excepturi atque sunt distinctio repellendus ipsam itaque explicabo sint tempora necessitatibus nulla amet veritatis mollitia id adipisci facere quisquam animi quaerat commodi ipsum modi eligendi vel maiores voluptatem dolores ab asperiores.</p>
  <img src="http://placehold.it/500x500&text=Image 2" class="fl" height="250" width="250"/><p>Veniam tempora impedit sunt excepturi nisi expedita corporis voluptatum quod eum dolores cupiditate quo odit iure doloribus corrupti molestias minus nihil temporibus accusamus ex. Cumque pariatur deleniti ipsam ea cum asperiores non suscipit natus. Molestias enim optio perferendis voluptatibus suscipit laborum officia cupiditate similique illum reprehenderit porro natus soluta modi facilis eligendi illo aspernatur nemo fugit sequi facere a quo iure eaque rem omnis et voluptatem quibusdam excepturi nihil. Commodi incidunt quos voluptatum sunt explicabo nobis perferendis vel iusto excepturi cupiditate blanditiis magni placeat autem dignissimos dolor maxime soluta qui voluptate esse obcaecati in tempora est molestias harum adipisci ex deleniti nesciunt odio aspernatur facilis provident laborum eum veniam quis sapiente expedita corporis possimus aut recusandae voluptas nihil a.</p>
  <p>Necessitatibus libero officia quaerat earum at ullam itaque dolorum. Eligendi illo culpa non quas sit commodi autem assumenda necessitatibus hic deserunt error quam reiciendis consequatur odio quo nostrum nam odit explicabo praesentium dolorum repellat ipsum placeat doloremque neque fugiat sapiente temporibus ad quis provident vitae maiores magnam numquam magni cum impedit dolorem animi voluptas qui deleniti sint. Obcaecati deserunt distinctio sapiente voluptate illo recusandae ad quod tenetur facere doloribus at perspiciatis beatae provident facilis reprehenderit dolorum ut aut dolor temporibus aperiam sunt quae vero modi magnam possimus sequi omnis aliquam. Rerum culpa vel voluptatem nihil aperiam temporibus mollitia odit earum quos rem placeat deleniti illum ea repellendus quisquam odio reprehenderit maxime provident quasi aliquam magnam autem reiciendis est dolorum similique facilis possimus adipisci modi quibusdam ipsam! Quia esse quae vero assumenda voluptatem!</p>
</section>

              
            
!

CSS

              
                //layout
$leftWidth: 40%;

//navigation
$hamWidth: 35px;
$hamHeight: 3px;
$hamSpacing: 8px;
$menuTransition: .2s;

//general
*, *:before, *:after {
  box-sizing: border-box;
}

html {
  font-size: 21px;
  font-family: 'Open Sans';
}

html, body {
  height: 100%;
} 

h1 {
  font-family: 'Raleway';
  font-size: 2.7em;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -2px;
  color: #222; 
  margin-bottom: .3em;
}

p {
  font-weight: 200;
  color: #525252;
} 

//reusable classes
.fl {
  float: left;
  margin: 20px;
}

.fr { 
  float: right;
  margin: 20px;
}

//specific
.hero {
  width: $leftWidth;
  height: 100%;
  position: fixed;
  background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%,rgba(0,0,0,0) 30%), url(http://fillmurray.com/1050/1050);  
  background-size: cover;
  background-position: center 30%;
  .hamb-wrap {
    height: 30px;
    width: $hamWidth + 5;
    position: absolute;
    top: 25px;
    left: 25px;
    cursor: pointer;
    z-index: 2;
  }
  .hamb {
    height: $hamHeight;
    width: $hamWidth;
    background: #fff;
    position: absolute;
    top: 10px;
    left: 0;
    transition: $menuTransition;
    border-radius: 10% 10% 10% 10% / 40% 40% 40% 40%;
    &:before,
    &:after {
      content: '';
      position: absolute;
      background: #fff;
      height: $hamHeight;
      width: 100%;
      transition: $menuTransition;
      border-radius: 10% 10% 10% 10% / 50% 50% 50% 50%;
    } 
    &:before {
      top: $hamSpacing;
    }
    &:after {
      top: -$hamSpacing;
    }
  }
  .active {
  background: none;
  transition: $menuTransition;
    &:before, &:after {
      transition: $menuTransition;
      top: 0;
    }
    &:before {
      transform: rotate(45deg);
    }
    &:after {
      transform: rotate(-45deg); 
    } 
  }
  .logo {
    color: white;
    font-family: 'Over the Rainbow';
    font-size: 1.9em;
    margin: 0 0 0 $hamWidth + 50px;
    line-height: 2;
  }
  nav {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    padding-top: 60px;
    font-family: 'Raleway';
    font-size: 2em;
    display: none;
    background: rgba(0, 0, 0, 0.8);
    ul {
      margin: 0 0 0 25px;
      padding: 0;
    }
    li {
      list-style-type: none;
      margin: 25px 0;
      position: relative;
    }
    a {
      text-decoration: none;
      color: #fff;
      text-transform: uppercase;
    }
  }
}

.content { 
  width: 100% - $leftWidth;
  min-height: 100%;
  margin-left: $leftWidth;
  padding: 4em 1.5em;
  overflow: hidden;
}

@media (max-width: 768px){ 
  //general
  html {
    font-size: 18px;
  }
 
  //specific
  .hero {
    height: 350px;
    width: 100%; 
    display: block;
    position: relative;
    padding: 1px;
    nav {
      font-size: 1.7em;
    }
  }
  .content {
    margin-left: 0;
    padding-top: 0;
    width: 100%;
  }
}

@media(max-width: 480px) {
  //reusable classes
  img.fl, img.fr {
    float: none;
    margin: 10px 0;
    width: 100%;
    height: auto;
  }
} 
              
            
!

JS

              
                $('.hamb-wrap').on('click', function(){
  $(this).parent().children('p').toggle();
  $(this).children().toggleClass('active');
  $('nav').fadeToggle(200);
}) 
              
            
!
999px

Console