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 CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

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="svg-wrapper-input">
  <svg height="60" width="277" xmlns="http://www.w3.org/2000/svg">
  	<rect class="shape-input" height="60" width="277" />
	</svg>
	<input class="text" placeholder="E-Mail Address">
	</input>
</div>

<div class="svg-wrapper-input">
	<svg class="textarea" height="200" width="277" xmlns="http://www.w3.org/2000/svg">
  	<rect class="shape-input" height="200" width="277" />
	</svg>
	<textarea class="text message" placeholder="Message"></textarea>
</div>

            
          
!
            
              body {
  background: #161616;
}

.shape-input {
    fill: transparent;
    stroke-dasharray: 279 394;
    stroke-dashoffset: 337;
    /*stroke-dasharray: 320;
    stroke-dashoffset: -474;*/
    stroke-width: 2px;
    stroke: #19f6e8;
    -webkit-animation: 0.8s draw-out-input ease forwards;
    -moz-animation: 0.8s draw-out-input ease forwards;
    -o-animation: 0.8s draw-out-input ease forwards;
    animation: 0.8s draw-out-input ease forwards;
}

.svg-wrapper-input {
    height: 60px;
	margin: 0 auto;
	padding: 5px 0;
    width: 277px;
    display: block;
    text-decoration: none;
}

input {
    outline: none;
    border: 0px;
    background: transparent;
    letter-spacing: 2px;
    padding-left: 25px;
    padding-right: 25px;
    width: 227px;
}

@keyframes draw-in-input {
    0% {
        stroke-dasharray: 279 394;
        stroke-dashoffset: -337;
    }
    100% {
        stroke-dasharray: 760;
        stroke-dashoffset: 0;
    }
}

@keyframes draw-out-input {
    0% {
        stroke-dasharray: 760;
        stroke-dashoffset: 0;
    }
    100% {
        stroke-dasharray: 279 394;
        stroke-dashoffset: -336;
    }
}

.svg-wrapper:hover .shape {
    -webkit-animation: 0.5s draw-in ease forwards;
    -moz-animation: 0.5s draw-in ease forwards;
    -o-animation: 0.5s draw-in ease forwards;
    animation: 0.5s draw-in ease forwards;
}

.input-active {
    -webkit-animation: 0.8s draw-in-input ease forwards;
    -moz-animation: 0.8s draw-in-input ease forwards;
    -o-animation: 0.8s draw-in-input ease forwards;
    animation: 0.8s draw-in-input ease forwards;
}

.text {
    color: #fff;
    font-family: 'Montserrat';
    font-size: 16px;
    letter-spacing: 8px;
    line-height: 60px;
    position: relative;
    top: -64px;
    margin: 0;
}

textarea {
    border: 0;
    outline: none;
    background: transparent;
    letter-spacing: 2px !important;
    padding: 15px 25px;
    width: 227px;
    top: -50px !important;
    resize: none;
    overflow: auto;
    line-height: 20px !important;
}
            
          
!
            
              			$(".svg-wrapper-input > input").focus(function () {
				$( this ).siblings("svg").children(".shape-input").toggleClass("input-active");
			});
			$(".svg-wrapper-input > input").focusout(function () {
				$( this ).siblings("svg").children(".shape-input").toggleClass("input-active");
			});
			
			$(".svg-wrapper-input > textarea").focus(function () {
				$( this ).siblings("svg").children(".shape-input").toggleClass("input-active");
			});
			$(".svg-wrapper-input > textarea").focusout(function () {
				$( this ).siblings("svg").children(".shape-input").toggleClass("input-active");
			});
			
			autosize($('textarea'));
			$('.message').keydown(function(){
				var msgHeight = $('.message').height();
				$('.textarea').attr( 'height', msgHeight + 20 );
				$('.textarea > .shape-input').attr( 'height', msgHeight + 20 );
			});
			
			$(function(){
				var msgHeight = $('.message').height();
				$('.textarea').attr( 'height', msgHeight + 20 );
				$('.textarea > .shape-input').attr( 'height', msgHeight + 20 );
			});
            
          
!
999px
Loading ..................

Console