cssAudio - ActiveCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmloctocatspinnerstartv

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.

            
              <div class="block">
  <div class="btn-fb-login">
    <span class="icon icon-fb"></span>
    <span class="title">Login with Facebook</span>
  </div>
  <div class="fb-login">
    <div class="title">Login with Facebook</div>
    <div class="login-form">
      <form method="post">
        <input type="text" placeholder="E-mail" />
        <input type="password" placeholder="Password" />
        <button type="submit" class="btn btn-login">Login</button>
      </form>
    </div>
  </div>
</div>
            
          
!
            
              @import "compass/css3";

html { background: url(http://s.cdpn.io/6035/fb_login_bg.png) repeat; }
body {  
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; 
  font-weight: 300;
}

.block { 
  width: 175px;
  margin: 50px auto;
}

.btn-fb-login {
  width: 100%;
  height: 30px;
  border: 1px solid rgba(0,0,0,0.3);
  border-radius: 4px;
  @include background-image(linear-gradient(top, rgba(72,107,181,1) 0%,rgba(51,78,135,1) 100%));
  box-shadow: inset 0 1px 3px rgba(255,255,255,0.2);
  cursor: pointer;
  &:hover {
      @include background-image(linear-gradient(top, rgba(72,107,181,1) 0%,rgba(35,59,108,1) 100%));
  }
  .icon {  
    background: url(http://s.cdpn.io/6035/fb_login_sprite.png) no-repeat;
    width: 11px;
    height: 22px;
    display: inline-block;
    float: left;
    margin: 3px 10px;
  }
  .title {
    font-size: (13/16) +em; 
    color: #fff;
    line-height: 30px;
    float: left;
    padding: 0 10px;
    text-shadow: -1px -1px 1px rgba(0,0,0,0.5);
    box-shadow: -1px 0 0 rgba(255,255,255,0.1) ;
    border-left: 1px solid rgba(0,0,0,0.3);
  }
}

.fb-login {
  display: none;
  width: 100%;
  margin-top: 20px;
  border: 1px solid rgba(0,0,0,0.3);
  border-radius: 4px;
  @include background-image(linear-gradient(top, rgba(72,107,181,1) 0%,rgba(51,78,135,1) 100%));
  box-shadow: inset 0 1px 3px rgba(255,255,255,0.2), 0 0 25px rgba(0,0,0,0.3); 
  .login-form {
    width: 155px;
    margin: 10px;
  }
  .title {
    font-size: (14/16) +em;
    color: #fff;
    text-shadow: -1px -1px 1px rgba(0,0,0,0.5);
    text-align: center;
    padding: 10px 0;
    margin: 0 0 10px 0;
    
  }
  input[type=text], input[type=password] {
    width: 100%;
    height: 30px;
    margin: 0 0 10px;
    padding: 0 5px;
    display: inline-block;
    background: rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.3);
    border-radius: 3px;
    box-sizing: border-box;
    box-shadow: inset 0 1px 3px rgba(40,40,40,0.3), 0 1px 0 rgba(255,255,255,0.1);
    font-size: (11/16) +em;
    color: #fff;
    outline: none;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.4);
    transition: background 0.3s ease;
    &:focus {
      background: rgba(0,0,0,0.03);
    }
  }
  .btn {
    width: 100%;
    height: 30px;
    border: 1px solid rgba(0,0,0,0.5);
    border-radius: 4px;
    @include background-image(linear-gradient(top, rgba(100,134,207,1) 0%,rgba(74,107,175,1) 100%));
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.3), 0 1px 1px rgba(0,0,0,0.1);
    color: #fff;
    font-size: (12/16) +em;
    text-shadow: -1px -1px 1px rgba(0,0,0,0.4);
    &:hover {
      @include background-image(linear-gradient(top, rgba(100,134,207,1) 0%,rgba(59,90,153,1) 100%));
    }
    &:active {
      box-shadow: inset 0 0 4px rgba(0,0,0,0.4);
      background: #35518d;
    }
  }
  
}
            
          
!
            
              $('.btn-fb-login').on('click',function(){
  $(this).fadeOut(function(){
    $('.fb-login').fadeIn();
  });
});
            
          
!
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