cssAudio - ActiveCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

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.

            
              .section.alt
  .wrap
    p Bacon ipsum dolor amet ham hock boudin pork belly leberkas hamburger meatloaf. Beef ribs chuck jowl filet mignon, shoulder tri-tip brisket ham flank t-bone bacon sirloin ground round ham hock doner. Pork alcatra beef ribs bresaola tongue. Flank meatloaf shoulder cow pig andouille pork loin pork belly turducken. Flank strip steak doner prosciutto ball tip spare ribs drumstick shankle jerky short ribs. Prosciutto ball tip shank hamburger sirloin. Filet mignon ball tip ham andouille tri-tip.
    //- link to content just in case
    a(href="/somewhere-to-content").drawer-button Show / Hide
.drawer
  .wrap
    p Bacon ipsum dolor amet ham hock boudin pork belly leberkas hamburger meatloaf. Beef ribs chuck jowl filet mignon, shoulder tri-tip brisket ham flank t-bone bacon sirloin ground round ham hock doner. Pork alcatra beef ribs bresaola tongue. Flank meatloaf shoulder cow pig andouille pork loin pork belly turducken. Flank strip steak doner prosciutto ball tip spare ribs drumstick shankle jerky short ribs. Prosciutto ball tip shank hamburger sirloin. Filet mignon ball tip ham andouille tri-tip.
    
 .section
  .wrap
    p Bacon ipsum dolor amet ham hock boudin pork belly leberkas hamburger meatloaf. Beef ribs chuck jowl filet mignon, shoulder tri-tip brisket ham flank t-bone bacon sirloin ground round ham hock doner. Pork alcatra beef ribs bresaola tongue. Flank meatloaf shoulder cow pig andouille pork loin pork belly turducken. Flank strip steak doner prosciutto ball tip spare ribs drumstick shankle jerky short ribs. Prosciutto ball tip shank hamburger sirloin. Filet mignon ball tip ham andouille tri-tip.
            
          
!
            
              .drawer {
  position: relative;
  display: none;
  overflow: hidden;
  background: white;
}

.drawer-button {
  color: orange;
  padding: 10px;
  width: 150px;
  text-decoration: none;
  background: white;
  position: absolute;
  left: calc(50% - 75px);
  bottom: 0;
  display: block;
  text-align: center;
  margin: auto;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Helvetica";
  line-height: 1.5;
  background: #2d2d2d;
}

.wrap {
  max-width: 1000px;
  margin: 50px auto;
  padding: 0 20px;
}

.section {
  background: #2d2d2d;
  color: white;
  padding: 50px 0;
  position: relative;
  z-index: 2;
  
  &.alt {
    border-bottom: 1px solid white;
  }
}
            
          
!
            
              // velocity.js
// classList shim

var App = {};

// show/hide vertical slide pattern with Velocity.js IE9+
App.verticalSlide = function(element, container, easing, duration) {
  var el = document.querySelector(element), // cache click target
    con = document.querySelector(container), // cache container target
    up = 'slideUp', // store up command
    down = 'slideDown'; // store down command
  
  el.addEventListener('click', function(event) {
      
  	var active = el.classList.contains('active'); // store active state
    el.classList.toggle('active'); // toggle click target active

    Velocity(con, active ? up : down, { // test and init command
      duration: duration, // duration set in function call params
      easing: easing // easing set in function call params
    });

    event.preventDefault();
    
	});
};

window.onload = function() {
	App.verticalSlide('.drawer-button', '.drawer', 'easeOutCirc', 600);
};

            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console