LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code

Name
Password
CSS
body {
  font-family: 'Lato', sans-serif;
  background: #18bc9c url("http://freshwallpapers.in/walls/green_blur_background-wide.jpg") center center;
}

.wrapper {
  max-width: 40em;
  padding: 2em;
  margin: 5em auto;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
  border-radius: 3px;
}

.login-heading {
  font-size: 2em;
  color: #18bc9c;
  margin-bottom: 1em;
}

.placeholder-override-wrap {
  position: relative;
  margin-bottom: 0;
  border-bottom: 1px solid #e0e0e0;
}
.placeholder-override-wrap:first-child {
  border-top: 1px solid #e0e0e0;
}

.placeholder-override-label {
  font-size: 1.5em;
  position: absolute;
  top: 50%;
  -webkit-transform: translateY(-50%);
  -moz-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  -o-transform: translateY(-50%);
  transform: translateY(-50%);
  -webkit-transition: all 0.3s;
  -moz-transition: all 0.3s;
  transition: all 0.3s;
}

.placeholder-override-input {
  z-index: 1;
  width: 100%;
  position: relative;
  border: 0;
  font-size: 1.5em;
  padding: 1em 0;
  background: 0 0;
}
.placeholder-override-input:focus {
  outline: none;
}
.placeholder-override-input:valid ~ .placeholder-override-label, .placeholder-override-input:focus ~ .placeholder-override-label {
  font-size: .85em;
  top: 20%;
  color: #18bc9c;
}

.btn {
  border: 1px solid transparent;
  display: inline-block;
  font-weight: normal;
  text-align: center;
  cursor: pointer;
  border-radius: 6px;
}
.btn:focus {
  background-color: #128f76;
  outline: none;
}

.btn-submit {
  padding: 0.8em 1em;
  font-size: 19px;
  color: #ffffff;
  background-color: #18bc9c;
  border-color: #18bc9c;
  margin-top: 1.5em;
}
JS
/*
Solution from http://stackoverflow.com/questions/3617020/matching-an-empty-input-box-using-css 

If only the field is required you could go with input:valid

*/
Host Instantly Drag and Drop Website Builder

 

Description

Making "floating form label" with only HTML5 and CSS3. No JS required.
Term
Wed, 11/29/2017 - 11:26

Related Codes

Pen ID
Pen ID
Pen ID