css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

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.

            
              <!-- 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>
            
          
!
            
              // 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);
}
            
          
!
            
              // 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
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console