cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

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="logo text-center">
  <h1>Logo</h1>
</div>
<div class="wrapper">
  <div class="inner-warpper text-center">
    <h2 class="title">Login to your account</h2>
    <form action="" id="formvalidate">
      <div class="input-group">
        <label class="palceholder" for="userName">User Name</label>
        <input class="form-control" name="userName" id="userName" type="text" placeholder="" />
        <span class="lighting"></span>
      </div>
      <div class="input-group">
        <label class="palceholder" for="userPassword">Password</label>
        <input class="form-control" name="userPassword" id="userPassword" type="password" placeholder="" />
        <span class="lighting"></span>
      </div>

      <button type="submit" id="login">Login</button>
      <div class="clearfix supporter">
        <div class="pull-left remember-me">
          <input id="rememberMe" type="checkbox">
          <label for="rememberMe">Remember Me</label>
        </div>
        <a class="forgot pull-right" href="#">Forgot Password?</a>
      </div>
    </form>
  </div>
  <div class="signup-wrapper text-center">
    <a href="#">Don't have an accout? <span class="text-primary">Create One</span></a>
  </div>
</div>

<!-- you don't need that :)  -->
<div class="direction">
  Type something in input and click submit to see the effect
</div>
            
          
!
            
              
@primary: #00A885;
//----- common css --------
body{
  background: #f2f2f2;
}
.animate{
  transition: all 0.3s linear;
}
.text-center{
  text-align: center;
}
.pull-left{
  float: left;
}
.pull-right{
  float: right;
}
.clearfix:after {
     visibility: hidden;
     display: block;
     font-size: 0;
     content: " ";
     clear: both;
     height: 0;
     }
.clearfix { display: inline-block; }
/* start commented backslash hack \*/
* html .clearfix { height: 1%; }
.clearfix { display: block; }
/* close commented backslash hack */
a{
  color: @primary;
  &:hover,
  &:focus{
    color: darken(@primary, 10%);
    .animate;
  }
}
.text-primary{
  color: @primary;
}
// chrome auto fill yello yaaak color
input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px white inset !important;
}

//------ common css end ------

.logo{
  h1{
    color: @primary;
    margin-bottom: -12px;
  }
}

input[type="checkbox"]{
  width: auto;
}
  button {
    cursor: pointer;
    background: @primary;
    width: 100%;
    border: 0;
    padding: 10px 15px;
    color: #fff;
    font-size: 20px;
    -webkit-transition: .3s linear;
    transition: .3s linear;
}


span.validate-tooltip {
    background: #D91717;
    width: 100%;
    display: block;
    padding: 5px;
    color: #fff;
    box-sizing: border-box;
    font-size: 14px;
    margin-top: -28px;
    transition: all 0.3s ease-in-out;
    -webkit-animation: tooltipanimation .3s 1;
    -moz-animation: tooltipanimation .3s 1;
    -o-animation: tooltipanimation .3s 1;
    animation: tooltipanimation .3s 1;
}
// focus animation css
.input-group{
  position: relative;
  margin-bottom: 20px;
  label{
    position: absolute;
    top: 9px;
    left: 10px;
    font-size: 16px;
    color: #cdcdcd;
    font-weight: normal;
    padding: 2px 5px;
    z-index: 5;
    .animate;
  }
  input{
      outline: none;
      display: block;
      width: 100%;
      height: 40px;
      position: relative;
      z-index: 3;
      border: 1px solid #d9d9d9;
      padding: 10px 10px;
      background: #ffffff;
      box-sizing: border-box;
      font-wieght: 400;
      -moz-transition: 0.3s ease;
      -webkit-transition: 0.3s ease;
      -o-transition: 0.3s ease;
      transition: 0.3s ease;
  }
  
  .lighting{
    background: @primary;
    width: 0;
    height: 2px;
    display: inline-block;
    position: absolute;
    top: 40px;
    left: 0;
    .animate;
  }
  // -- when input is focused or have value
  &.focused{
    .lighting{
      width: 100%;
     
    }
    label{
      background: #fff;
      font-size: 12px;
      top: -8px;
      left: 5px;
      color: @primary;
    }
  }
  // ---  end  ---- 
  
  span.validate-tooltip {
    margin-top: 0;
  }
}

// layout module
.wrapper{
  width: 320px;
  background: #fff;
  margin: 20px auto;
  min-height: 200px;
  border: 1px solid #f3f3f3;
  .inner-warpper{
    padding: 50px 30px 60px;
    box-shadow: 1px 1.732px 10px 0px rgba(0, 0, 0, 0.063);
  }
  .title{
    margin-top: 0;
  }
  .supporter{
    margin-top: 10px;
    font-size: 14px;
    color: #8E8E8E;
    cursor: pointer;
  }
  .remember-me{
      cursor: pointer;
  }
  input[type="checkbox"]{
    float: left;
    margin-right: 5px;
    margin-top: 2px;
    cursor: pointer;
  }
  label[for="rememberMe"]{
    cursor: pointer;
  }
  .signup-wrapper{
    padding: 10px;
    font-size: 14px;
    background: #EBEAEA;
    a{
      text-decoration: none;
      color: #7F7F7F;
      &:hover{
        text-decoration: underline;
      }
    }
  }
}


// animatie tooltip
@-webkit-keyframes tooltipanimation {
	from {
		margin-top: -28px;
	}

	to {
		margin-top: 0;
	}
}
@-moz-keyframes tooltipanimation {
	from {
		margin-top: -28px;
	}

	to {
		margin-top: 0;
	}
}
@-o-keyframes tooltipanimation {
	from {
		margin-top: -28px;
	}

	to {
		margin-top: 0;
	}
}
@keyframes tooltipanimation {
	from {
		margin-top: -28px;
	}

	to {
		margin-top: 0;
	}
}





// dummy no need to take
.direction{
  width: 200px;
  position: fixed;
  top: 120px; left: 20px;
  font-size: 14px;
  line-height: 1.2;
  text-align: center; 
  background: #9365B8;
  padding: 10px; 
  color: #fff;
  
  @media (max-width: 480px) {
       position: static;
  }
}





            
          
!
            
              + function($) {
  $('.palceholder').click(function() {
    $(this).siblings('input').focus();
  });

  $('.form-control').focus(function() {
    $(this).parent().addClass("focused");
  });

  $('.form-control').blur(function() {
    var $this = $(this);
    if ($this.val().length == 0)
      $(this).parent().removeClass("focused");
  });
  $('.form-control').blur();

  // validetion
  $.validator.setDefaults({
    errorElement: 'span',
    errorClass: 'validate-tooltip'
  });

  $("#formvalidate").validate({
    rules: {
      userName: {
        required: true,
        minlength: 6
      },
      userPassword: {
        required: true,
        minlength: 6
      }
    },
    messages: {
      userName: {
        required: "Please enter your username.",
        minlength: "Please provide valid username."
      },
      userPassword: {
        required: "Enter your password to Login.",
        minlength: "Incorrect login or password."
      }
    }
  });

}(jQuery);
            
          
!
999px
Loading ..................

Console