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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <button id="toggle-control">Toggle CSS3 Transform</button>
<section class="site-wrap">
  <header>
    <nav>
      <ul>
        <li><a href="#">Home</a></li>
        <li><a href="#">About</a></li>
        <li><a href="#">Our Products</a></li>
        <li><a href="#">Our Services</a></li>
        <li><a href="#">Contact</a></li>
      </ul>
    </nav>
  </header>
  <section id="site-content">
    <article id="ups"><h3>The header above is position fixed. Scroll down and then click the toggle button to see it no longer being fixed to the viewport.</h3></article>
    <article id="hard-sell">
      <p>Before they sold out viral meggings chillwave keytar, crucifix street art cliche direct trade  craft beer.  Photo booth leggings mlkshk cray chia, cold-pressed beard roof party fap Etsy Brooklyn Odd Future lomo bespoke fixie.  Scenester whatever letterpress Odd Future you probably haven't heard of them.  Flexitarian twee viral hoodie Tumblr Helvetica direct trade  post-ironic.  Typewriter cardigan PBR&amp;B, vinyl Intelligentsia fap ugh ethical lo-fi taxidermy gentrify asymmetrical Portland Thundercats Bushwick.  Keytar hashtag typewriter VHS actually.  Odd Future ethical selfies artisan Godard cronut drinking vinegar, Shoreditch church-key.</p><p>Yr ethical artisan, vinyl banh mi meggings bicycle rights scenester pour-over jean shorts banjo Schlitz Banksy.  Plaid direct trade  pickled, biodiesel tattooed vegan freegan.  Leggings pug scenester, banjo Echo Park retro stumptown hella salvia meggings XOXO.  Slow-carb umami artisan squid.  Keffiyeh polaroid lo-fi, 8-bit pork belly pop-up readymade 90's semiotics ugh plaid Marfa Banksy.  Next level chillwave before they sold out, wayfarers Thundercats seitan tofu taxidermy Echo Park Schlitz jean shorts.  Kogi sriracha seitan Etsy mustache Bushwick.</p><p>Lumbersexual single-origin coffee cred, Godard art party cold-pressed stumptown YOLO plaid.  Ennui beard tattooed, roof party bicycle rights selvage Tumblr freegan McSweeney's.  Tote bag drinking vinegar listicle dreamcatcher craft beer, crucifix ethical biodiesel photo booth lomo artisan.  Scenester VHS health goth ethical put a bird on it lumbersexual.  Occupy hella Pinterest High Life 90's.  Flexitarian XOXO church-key normcore, Tonx mixtape plaid Etsy disrupt kitsch.  Schlitz wayfarers 90's, sartorial keytar food truck normcore.</p><p>Vice normcore literally, yr chia fap biodiesel craft beer Cosby sweater wayfarers plaid cray ugh VHS.  Gluten-free PBR literally flexitarian.  Tumblr chillwave crucifix salvia.  Pork belly listicle church-key four dollar toast craft beer cliche.  Actually cronut fingerstache polaroid photo booth.  Godard kale chips fashion axe trust fund vegan Odd Future.  Seitan dreamcatcher sriracha letterpress.</p><p>Ethical four dollar toast chambray, retro wayfarers roof party locavore banjo YOLO.  Flexitarian scenester American Apparel, pop-up kitsch meh Portland deep v.  Neutra post-ironic Shoreditch typewriter, kale chips try-hard vinyl Tonx lumbersexual lomo keffiyeh.  Scenester Carles slow-carb, American Apparel crucifix Bushwick organic kogi cred.  Food truck hella semiotics chia mustache Vice.  Vice aesthetic Williamsburg sustainable, health goth master cleanse salvia deep v Portland.  Yr mixtape Etsy iPhone next level fashion axe.</p><p>IPhone pour-over blog sartorial, Thundercats Kickstarter aesthetic Pitchfork mustache kogi vinyl.  Sriracha fingerstache photo booth mixtape, selfies tousled single-origin coffee viral.  Salvia seitan roof party, 90's Williamsburg Thundercats pug art party.  Paleo Vice Pinterest VHS, banh mi banjo chia trust fund cornhole.  Marfa roof party photo booth ennui.  Seitan crucifix XOXO quinoa, lumbersexual Shoreditch next level ethical biodiesel master cleanse normcore slow-carb messenger bag.  Raw denim disrupt crucifix mumblecore, cred Schlitz Williamsburg.</p><p>Before they sold out viral meggings chillwave keytar, crucifix street art cliche direct trade  craft beer.  Photo booth leggings mlkshk cray chia, cold-pressed beard roof party fap Etsy Brooklyn Odd Future lomo bespoke fixie.  Scenester whatever letterpress Odd Future you probably haven't heard of them.  Flexitarian twee viral hoodie Tumblr Helvetica direct trade  post-ironic.  Typewriter cardigan PBR&amp;B, vinyl Intelligentsia fap ugh ethical lo-fi taxidermy gentrify asymmetrical Portland Thundercats Bushwick.  Keytar hashtag typewriter VHS actually.  Odd Future ethical selfies artisan Godard cronut drinking vinegar, Shoreditch church-key.</p><p>Yr ethical artisan, vinyl banh mi meggings bicycle rights scenester pour-over jean shorts banjo Schlitz Banksy.  Plaid direct trade  pickled, biodiesel tattooed vegan freegan.  Leggings pug scenester, banjo Echo Park retro stumptown hella salvia meggings XOXO.  Slow-carb umami artisan squid.  Keffiyeh polaroid lo-fi, 8-bit pork belly pop-up readymade 90's semiotics ugh plaid Marfa Banksy.  Next level chillwave before they sold out, wayfarers Thundercats seitan tofu taxidermy Echo Park Schlitz jean shorts.  Kogi sriracha seitan Etsy mustache Bushwick.</p><p>Lumbersexual single-origin coffee cred, Godard art party cold-pressed stumptown YOLO plaid.  Ennui beard tattooed, roof party bicycle rights selvage Tumblr freegan McSweeney's.  Tote bag drinking vinegar listicle dreamcatcher craft beer, crucifix ethical biodiesel photo booth lomo artisan.  Scenester VHS health goth ethical put a bird on it lumbersexual.  Occupy hella Pinterest High Life 90's.  Flexitarian XOXO church-key normcore, Tonx mixtape plaid Etsy disrupt kitsch.  Schlitz wayfarers 90's, sartorial keytar food truck normcore.</p><p>Vice normcore literally, yr chia fap biodiesel craft beer Cosby sweater wayfarers plaid cray ugh VHS.  Gluten-free PBR literally flexitarian.  Tumblr chillwave crucifix salvia.  Pork belly listicle church-key four dollar toast craft beer cliche.  Actually cronut fingerstache polaroid photo booth.  Godard kale chips fashion axe trust fund vegan Odd Future.  Seitan dreamcatcher sriracha letterpress.</p><p>Ethical four dollar toast chambray, retro wayfarers roof party locavore banjo YOLO.  Flexitarian scenester American Apparel, pop-up kitsch meh Portland deep v.  Neutra post-ironic Shoreditch typewriter, kale chips try-hard vinyl Tonx lumbersexual lomo keffiyeh.  Scenester Carles slow-carb, American Apparel crucifix Bushwick organic kogi cred.  Food truck hella semiotics chia mustache Vice.  Vice aesthetic Williamsburg sustainable, health goth master cleanse salvia deep v Portland.  Yr mixtape Etsy iPhone next level fashion axe.</p><p>IPhone pour-over blog sartorial, Thundercats Kickstarter aesthetic Pitchfork mustache kogi vinyl.  Sriracha fingerstache photo booth mixtape, selfies tousled single-origin coffee viral.  Salvia seitan roof party, 90's Williamsburg Thundercats pug art party.  Paleo Vice Pinterest VHS, banh mi banjo chia trust fund cornhole.  Marfa roof party photo booth ennui.  Seitan crucifix XOXO quinoa, lumbersexual Shoreditch next level ethical biodiesel master cleanse normcore slow-carb messenger bag.  Raw denim disrupt crucifix mumblecore, cred Schlitz Williamsburg.</p>
    </article>
  </section>
  <footer>
    &copy; 2014. Some Company.
    <ul>
      <li><a href="#">A</a></li>
      <li><a href="#">bunch</a></li>
      <li><a href="#">of</a></li>
      <li><a href="#">footer</a></li>
      <li><a href="#">links</a></li>
      <li><a href="#">required</a></li>
      <li><a href="#">by</a></li>
      <li><a href="#">business</a></li>
      <li><a href="#">that</a></li>
      <li><a href="#">no</a></li>
      <li><a href="#">one</a></li>
      <li><a href="#">ever</a></li>
      <li><a href="#">uses</a></li>
    </ul>
  </footer>
</section>



              
            
!

CSS

              
                @import "lesshat";


#toggle-control {position:fixed; top:3em; left:2em;}
.site-wrap.transformed {-moz-transform: translateX(250px); -webkit-transform: translateX(250px); -o-transform: translateX(250px); -ms-transform: translateX(250px); transform: translateX(250px);}

.site-wrap {background:rgba(153,249,233,1); max-width:980px; margin:0 auto; -webkit-transition: all 0.5s ease-in-out;
-moz-transition: all 0.5s ease-in-out;
-ms-transition: all 0.5s ease-in-out;
-o-transition: all 0.5s ease-in-out;
transition: all 0.5s ease-in-out;
  header { background:#fff; position:fixed; width:100%;
    nav {
      ul {list-style-type:none; text-align:left; margin:0; padding:0;
        li {display:inline-block; 
          a {text-decoration:none; display:block; text-transform:uppercase; color:#1f1f1f; font-weight:700; border-bottom:1px solid transparent; padding:1em 2em;
          &:hover {background:rgba(249,153,157,0.5);}
          }
        }
      }
    }
  }
  #site-content {padding:4em 1em 0;
    h3 {text-align:center; padding:2em 0; max-width:700px; margin:0 auto;}
  }
  footer {font-size:12px; text-align:center; padding:2em 0;
    ul {list-style-type:none; text-align:center;
      li {display:inline-block;
        a {text-decoration:none; color:#1f1f1f;}
      }
    }
  }
}
              
            
!

JS

              
                $(function() {
    $('#toggle-control').click(function(){
      $('.site-wrap').toggleClass('transformed');
    });
});
              
            
!
999px

Console