_x000D_
$('.form-fild input,.form-fild textarea').focus(function() {_x000D_
$(this).parent().addClass('open');_x000D_
});_x000D_
_x000D_
$('.form-fild input,.form-fild textarea').blur(function() {_x000D_
$(this).parent().removeClass('open');_x000D_
});
_x000D_
.open {_x000D_
color:red; _x000D_
}_x000D_
.form-fild {_x000D_
position: relative;_x000D_
margin: 30px 0;_x000D_
}_x000D_
.form-fild label {_x000D_
position: absolute;_x000D_
top: 5px;_x000D_
left: 10px;_x000D_
padding:5px;_x000D_
}_x000D_
_x000D_
.form-fild.open label {_x000D_
top: -25px;_x000D_
left: 10px;_x000D_
/*background: #ffffff;*/_x000D_
}_x000D_
.form-fild input[type="text"] {_x000D_
padding-left: 80px;_x000D_
}_x000D_
.form-fild textarea {_x000D_
padding-left: 80px;_x000D_
}_x000D_
.form-fild.open textarea, _x000D_
.form-fild.open input[type="text"] {_x000D_
padding-left: 10px;_x000D_
}_x000D_
textarea,_x000D_
input[type="text"] {_x000D_
padding: 10px;_x000D_
width: 100%;_x000D_
}_x000D_
textarea,_x000D_
input,_x000D_
.form-fild.open label,_x000D_
.form-fild label {_x000D_
-webkit-transition: all 0.2s ease-in-out;_x000D_
-moz-transition: all 0.2s ease-in-out;_x000D_
-o-transition: all 0.2s ease-in-out;_x000D_
transition: all 0.2s ease-in-out;_x000D_
}
_x000D_
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>_x000D_
<div class="container">_x000D_
<div class="row">_x000D_
<form>_x000D_
<div class="form-fild">_x000D_
<label>Name :</label>_x000D_
<input type="text">_x000D_
</div>_x000D_
<div class="form-fild">_x000D_
<label>Email :</label>_x000D_
<input type="text">_x000D_
</div>_x000D_
<div class="form-fild">_x000D_
<label>Number :</label>_x000D_
<input type="text">_x000D_
</div>_x000D_
<div class="form-fild">_x000D_
<label>Message :</label>_x000D_
<textarea cols="10" rows="5"></textarea>_x000D_
</div>_x000D_
</form>_x000D_
</div>_x000D_
</div>
_x000D_