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. 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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <ul class="tab-group">
  <li class="tab active"><a href="#signup">Sign Up</a></li>
  <li class="tab"><a href="#login">Log In</a></li>
 </ul>

 <div class="form-group">
   <div class="tab-content">
    <div id="signup">
      
      <div>
        <label for="name">Name<span class="req">*</span></label>
        <input type="text" class="form-control" id="name" required autocomplete="off"/>
     </div>

     <div>
       <label for="email">Email<span class="req">*</span></label>
       <input type="text" class="form-control" id="email" required autocomplete="off"/>
     </div>
      
     <div>
      <label for="password">Password<span class="req">*</span></label>
      <input type="password" class="form-control" id="password" required autocomplete="off"/>
     </div>

     <div>
      <label for="password1">Again Password<span class="req">*</span></label>
      <input type="password" class="form-control" id="password1" required autocomplete="off"/>
     </div>
      
      <div>
       <button type="submit" class="btn">Sign Up</button>
     </div>
      
    </div>
   </div>
  </div>


<div class="form-group">
    <div class="tab-content">
      <div id="login">

        <div>
          <label>Email<span class="req">*</span></label>
          <input type="email" class="form-control" required autocomplete="off"/>
        </div>

        <div>
          <label>Password<span class="req">*</span></label>
          <input type="password" class="form-control" required autocomplete="off"/>
        </div>

        <div>
          <a href="#" class="forgot">Forgot Password?</a>
        </div>
        
        <div>
          <button type="submit" class="btn">Log In</button>
        </div>
  
      </div>
    </div>
  </div>
              
            
!

CSS

              
                @mixin box-sizing($box-model){
 -webkit-box-sizing:$box-model;
 -moz-box-sizing:$box-model;
 box-sizing:$box-model;
}

@mixin border-radius($radius){
 -webkit-border-radius:$radius;
 -moz-border-radius:$radius;
 border-radius:$radius;
}

@mixin box-shadow($shadow){
 -webkit-box-shadow:$shadow;
 -moz-box-shadow:$shadow;
 box-shadow:$shadow;
}

@mixin transition($transition){
 -webkit-transition:$transition;
 -moz-transition: $transition;
 -o-transition:$transition;
 transition: $transition;
}

@mixin transition($transition1){
 -webkit-transition:$transition1;
 -moz-transition: $transition1;
 -o-transition: $transition1;
 transition: $transition1;
}

@mixin backface-visibility($visibility) {
 -webkit-backface-visibility: $visibility;
 -moz-backface-visibility: $visibility;
 backface-visibility: $visibility;
}

@mixin  transform($transform) {
 -webkit-transform: $transform;
 -moz-transform: $transform;
 -ms-transform: $transform;
 -o-transform: $transform;
 transform: $transform;
}

@mixin transition($transition1) {
 -webkit-transition: $transition1;
 -moz-transition: $transition1;
 -o-transition: $transition1;
 transition: $transition1;
}

$box-model:border-box;
$radius:10px;
$shadow:0px 4px 6px darkgray;
$transition:0.5s ease;
$transition1:all 0.25 ease;
$visibility:hidden;
$transform:translateY(50px);
$transition2:border-color 0.25 ease, box-shadow 0.25 ease;

*, *:after, *:before{
 @include box-sizing($box-model);
 font-family:Georgia;

}

.tab-group{ 
 margin-left: 400px;
 
 &:after{
  content: "";
  display: table;
  clear:both;
 }
  .tab{
   list-style-type: none;
   padding: 16px;
   border:2px solid purple;
   @include box-shadow($shadow);
   background-color:purple; 
   width:200px;
   margin-top:120px;
   display: inline-block;
   text-align: center;

  }

  a{
   text-decoration: none;
   color:whitesmoke;
   display: block;
   float:left;
   text-align: center;
   @include transition($transition);
  }

  
 }

 .tab-content > div:last-child{
  display: none;
 }


.tab-content{
 width:600px;
 background-color: orchid;
 border:2px solid darkorchid;
 float: left;
 margin-left:320px;


 label{
  margin-left: 20px;
  margin-top: 25px;
  color:whitesmoke;
  @include transition($transition1);
  @include backface-visibility($visibility);

  &.active{
   @include transform($transform);
  }
 }
 .form-control{
  width:300px;
  height:30px;
  margin-left: 150px;
  margin-top: -30px;
  margin-bottom: 10px;
  @include border-radius($radius);
  @include box-shadow($shadow);
  @include transition($transition2);

  &:focus{
   @include transition($transition1);
  }
 }

 .btn{
  width:200px;
  margin-left:200px;
  margin-bottom:15px;
  padding: 8px;
  border:2px solid darkorchid;
  background-color: darkorchid;
  color:whitesmoke;
  @include border-radius($radius);
  @include box-shadow($shadow);
 }
}

.forgot{
 text-decoration: none;
 color:darkblue;
 margin-left: 20px;

 &:hover{
  text-decoration: none;
  color:whitesmoke;
 }
}
              
            
!

JS

              
                $('.tab a').on('click', function (e) {
  
  e.preventDefault();
  
  $
  (this).parent().addClass('active');
  $(this).parent().siblings().removeClass('active');
  
  target = $(this).attr('href');

  $('.tab-content > div').not(target).hide();
  
  $(target).fadeIn(600);
  
});
              
            
!
999px

Console