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="page">
  <div class="page__content">
    <div class="page__demo">
      <label class="field field_animated field_a1 page__field">
        <input class="field__input" placeholder="e.g. Melnikov Stanislav" required>
        <span class="field__label-wrap">
          <span class="field__label">Enter your name</span>
        </span>
      </label>
      <label class="field field_animated field_a2 page__field">
        <input class="field__input" placeholder="e.g. Melnikov Stanislav" required>
        <span class="field__label-wrap">
          <span class="field__label">Enter your name</span>
        </span>
      </label>    
      <label class="field field_animated field_a3 page__field">
        <input class="field__input" placeholder="e.g. Melnikov Stanislav" required>
        <span class="field__label-wrap">
          <span class="field__label">Enter your name</span>
        </span>
      </label>
    </div>
  </div>
  <div class="page__footer">
    <p class="page__donation-text">
      If you like this demo in particular and my work in general and you want me to be able to continue putting stuff out, please show your appreciation with a <a href="https://www.paypal.me/melnik909" class="page__donate" rel="noopener noreferrer" target="_blank">donation</a>
    </p>
  </div>
</div>

            
          
!
            
              /*
=====
LEVEL 1. RESET STYLES
=====
*/

.field{
  --uiFieldPlaceholderColor: var(--fieldPlaceholderColor, #767676);
}

.field__input{ 
	background-color: transparent;
	border-radius: 0;
  border: none;
	
	-webkit-appearance: none;
	-moz-appearance: none;
	
	font-family: inherit;
	font-size: 1em;
}

.field__input:focus::-webkit-input-placeholder{
	color: var(--uiFieldPlaceholderColor);
}

.field__input:focus::-moz-placeholder{
	color: var(--uiFieldPlaceholderColor);
	opacity: 1;
}

/*
=====
LEVEL 2. CORE STYLES
=====
*/

.field{
  display: inline-block;
}

.field__input{ 
	display: block;
	box-sizing: border-box;
	width: 100%;
}

/*
=====
LEVEL 3. PRESENTATION STYLES
=====
*/

/* field_animated */

.field_animated{
  --uiFieldHeight: var(--fieldHeight, 40px);  
  --uiFieldBorderWidth: var(--fieldBorderWidth, 2px);
  --uiFieldBorderColor: var(--fieldBorderColor);
  
  --uiFieldFontSize: var(--fieldFontSize, 1em);
  --uiFieldHintFontSize: var(--fieldHintFontSize, 1em);

  --uiFieldPaddingRight: var(--fieldPaddingRight, 15px);
  --uiFieldPaddingBottom: var(--fieldPaddingBottom, 15px);
  --uiFieldPaddingLeft: var(--fieldPaddingLeft, 15px);   
 
	position: relative;
	box-sizing: border-box;
  font-size: var(--uiFieldFontSize);
	padding-top: 1em;  
}

.field_animated .field__input{
  height: var(--uiFieldHeight);
  padding: 0 var(--uiFieldPaddingRight) 0 var(--uiFieldPaddingLeft);
  border-bottom: var(--uiFieldBorderWidth) solid var(--uiFieldBorderColor);  
}

.field_animated .field__input::-webkit-input-placeholder{
	opacity: 0;
	transition: opacity .2s ease-out;
}

.field_animated .field__input::-moz-placeholder{
	opacity: 0;
	transition: opacity .2s ease-out;
}

.field_animated .field__input:focus{
	outline: none;
}

.field_animated .field__input:not(:placeholder-shown) ~ .field__label-wrap .field__label{
	opacity: 0;
	bottom: var(--uiFieldPaddingBottom);
}

.field_animated .field__input:focus::-webkit-input-placeholder{
	opacity: 1;
	transition-delay: .2s;
}

.field_animated .field__input:focus::-moz-placeholder{
	opacity: 1;
	transition-delay: .2s;
}

.field_animated .field__label-wrap{
	box-sizing: border-box;
	width: 100%;
	height: var(--uiFieldHeight);	
	
	pointer-events: none;
	cursor: text;

	position: absolute;
	bottom: 0;
	left: 0;
}

.field_animated .field__label{
	position: absolute;
	left: var(--uiFieldPaddingLeft);
  bottom: var(--uiFieldPaddingBottom);
	
  line-height: 1;
  font-size: var(--uiFieldHintFontSize);
  
	pointer-events: none;
	transition: bottom .2s cubic-bezier(0.9,-0.15, 0.1, 1.15), opacity .2s ease-out;
	will-change: bottom, opacity;
}

.field_animated .field__input:focus ~ .field__label-wrap .field__label{
	opacity: 1;
  bottom: var(--uiFieldHeight);
}

/* field_a1 */

.field_a1 .field__input{
	transition: border-color .2s ease-out;
	will-change: border-color;
}

.field_a1 .field__input:focus{
	border-color: var(--fieldBorderColorActive);
}

/* field_a2 */

.field_a2 .field__label-wrap:after{
	content: "";
  box-sizing: border-box;
  width: 0;
	height: var(--uiFieldBorderWidth);
  background-color: var(--fieldBorderColorActive);
  
	position: absolute;
	bottom: 0;
	left: 0;  
  
	will-change: width;
	transition: width .285s ease-out;
}

.field_a2 .field__input:focus ~ .field__label-wrap:after{
	width: 100%;
}

/* field_a3 */

.field_a3{
  padding-top: 1.5em;
}

.field_a3 .field__label-wrap:after{
	content: "";
  box-sizing: border-box;
	width: 100%;
	height: 0;
	
  opacity: 0;
  border: var(--uiFieldBorderWidth) solid var(--fieldBorderColorActive);
  
	position: absolute;
	bottom: 0;
	left: 0;

  will-change: opacity, height;
	transition: height .2s ease-out, opacity .2s ease-out;
}

.field_a3 .field__input:focus ~ .field__label-wrap:after{
	height: 100%;
	opacity: 1;
}

.field_a3 .field__input:focus ~ .field__label-wrap .field__label{
	bottom: calc(var(--uiFieldHeight) + .5em);
}

/*
=====
LEVEL 4. SETTINGS
=====
*/

.field{
  --fieldBorderColor: #D1C4E9;
  --fieldBorderColorActive: #673AB7;
}

            
          
!
999px
Loading ..................

Console