Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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

              
                <div class="stuff">
<div class="textBox">
  <input 
         class="text" 
         type="textbox"
         placeholder="Email Address"
         onkeyup="this.setAttribute('value', this.value);"
         value=""/>
  <label class="label">Email Address</label>
  <label class="error"></label>
</div>
<div class="textBox">
  <input 
         class="text" 
         type="password"
         placeholder="Password"
         onkeyup="this.setAttribute('value', this.value);"
         value=""/>
  <label class="label">Password</label> 
  <label class="error"></label>
</div>
</div>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Roboto');

body {
  background-color: #0288D1;
  font-family: 'Roboto', sans-serif;  
}
.stuff {
  width: 25vw;
}
.textBox {
  position: relative;
  width: 100%;
  padding-top: 10px;
  height: 45px;
  display: inline-flex;
  margin-bottom: 3vh;
}
.textBox .text {
  font-weight: 500;
  width: calc(100% - 2vw);
  height: 27px;
  padding-left: 0.5vw;
  background-color: transparent;
  color: white;
  position: absolute;
  bottom: 0px;
  outline: none;
  border-style: solid;
  border-color: #E3E7EA;
  border-width: 0px 0px 2px 0px;
  font-size: 20px;
  -webkit-transition: border-color 0.45s linear;
  transition: border-color 0.45s linear;
}

.textBox > input.text:focus {
  border-color: #B2FF59;
}

.textBox .label {
  opacity: 0.1;
  pointer-events: none;
  z-index: 1;
  color: #C0C0C0;
  position: absolute;
  padding-left: 0.5vw;
  bottom: 3px;
  font-size: 20px;
  font-weight: 300;
  -webkit-transition-property: opacity bottom font-size;
  transition-property: opacity bottom font-size;
  -webkit-transition-duration: 0.45s;
  transition-duration: 0.45s;
  -webkit-transition-timing-function: cubic-bezier(.68,-0.55,.27,1.55);
  transition-timing-function: cubic-bezier(.68,-0.55,.27,1.55);
}

.textBox .error {
  position: absolute;
  margin-top: 48px;
  width: 100%;
  color: #e74c3c;
  text-align: center;
}

.textBox > input.text:focus ~ .label, .textBox > input.text:not([value=""]) ~ .label {
  opacity: 1;
  z-index: 1;
  bottom: 55%;
  font-size: 12px;
}

.textBox > input.text:focus ~ .label {
  color: #B2FF59;
}

.textBox ::-webkit-input-placeholder { /* Chrome/Opera/Safari */
  color: #2B2B2B;
  font-size: 20px;
  font-weight: 200;
  font-family: 'Roboto', sans-serif;
}
.textBox ::-moz-placeholder { /* Firefox 19+ */
  color: #2B2B2B;
  font-size: 20px;
  font-weight: 200;
  font-family: 'Roboto', sans-serif;
}
.textBox :-ms-input-placeholder { /* IE 10+ */
  color: #2B2B2B;
  font-size: 20px;
  font-weight: 200;
  font-family: 'Roboto', sans-serif;
}
.textBox :-moz-placeholder { /* Firefox 18- */
  color: #2B2B2B;
  font-size: 20px;
  font-weight: 200;
  font-family: 'Roboto', sans-serif;
}
              
            
!

JS

              
                
              
            
!
999px

Console