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

              
                <!-- fa pls -->
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">

<!-- animate.css -->
<link href="https://s3-us-west-2.amazonaws.com/s.cdpn.io/67239/animate.min.css" rel="stylesheet" />

<!-- under overlay stuff -->
<div class="body"></div>

<!-- the panel -->
<div class="overlay">
  <div class="ui-panel login-panel animated bounceInDown">
    <header>
      <div class="left logo">
        <a href="#logo"><span>Banana</span>plate</a>
      </div>
      
      <div class="right">
        <a href="#close" id="close" class="ui-button close">
          x
        </a>
      </div>
    </header>
    
    <div class="login-form">
      <div class="subtitle">Login or register</div>
      <input type="text" placeholder="Username" />
      <input type="text" placeholder="Password" />
    </div>
    
    <footer>
      <div class="left social-login">
        Login with 
        <i class="fa fa-fw fa-twitter"></i>
        <i class="fa fa-fw fa-facebook"></i>
        <i class="fa fa-fw fa-google-plus"></i>
      </div>
      
      <div class="right form-actions">
        <a href="#login" class="ui-button inactive login">Login</a>
        <a href="#register" class="ui-button inactive register">Register</a>
      </div>
    </footer>
  </div>
</div>

<!-- get dem fancy typefaces -->
<script type="text/javascript" src="//use.typekit.net/psm0wvc.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
              
            
!

CSS

              
                // Resets and base styles
body {
  font-family: "proxima-nova",sans-serif;
  font-size: 16px;
  a { color: inherit; text-decoration: none; }
}

* { outline: 0; border: 0; margin: 0; }

.left {float: left;} .right {float: right;}

%clearfix {
  &:after {
    content: "";
    display: table;
    clear: both;
  }
}

$yellow: #ffdd00;

// lets go
.ui-panel {
  margin: 0 auto;
  margin-top: 120px;
  width: 360px;
  height: auto;
  background-color: black;
  color: white;
  border: 1px solid #161616;
  box-shadow: 0px 0px 12px rgba(0,0,0,0.3);
  //center dis
  position: absolute;
  margin-top: -130px;
  margin-left: -181px;
  top: 50%;
  left: 50%;
}

header {
  height: 46px;
  border-bottom: 1px solid  #161616;
  line-height: 46px;
  padding: 0 28px;
  font-size: 0.65em;
  font-weight: 600;
  letter-spacing: 0.3em;
  @extend %clearfix;
  .logo { text-transform: uppercase; }
  .close {
  }
  span { color: $yellow; }
}

.login-form {
  padding: 18px 28px 0 28px;
  @extend %clearfix;
  .subtitle { font-size: 0.92em; }
  input {
    font-size: 1.05em;
    font-weight: 300;
    margin-top: 18px;
    padding: 10px 8px;
    width: 288px;
  }
}

footer {
  padding: 26px 28px 22px 28px;
  @extend %clearfix;
  font-size: 0.82em;
  .social-login {
    i:first-child { margin-left: 4px; }
  }
  .form-actions {
    a { padding: 4px 8px;}
  }
  .register {
    background-color: $yellow;
    color: black;
    border-radius: 2px;
  }
}

// overlay + body
body {
  width: 100%;
  height: 100%;
  // background: url(http://placekitten.com/600/600) no-repeat center center fixed;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.88);
}
              
            
!

JS

              
                // Quick exercise
// Working on a login panel from my Bananaplate project
// http://dribbble.com/iamnbutler/projects/178899-BANANAPLATE

$(document).ready(function(){
  // No links pls
  $('.ui-button.inactive').click(function(){
    e.preventDefault();
  });
  
  $('#close').click(function(){
    $('.ui-panel').removeClass('bounceInDown').addClass('bounceOutUp');
  });
});
              
            
!
999px

Console