"Material design input"
Bootstrap 3.3.0 Snippet by pradeep330

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<div class="container">
<div class="row">
<div class="col-md-3">
<div class="pad15"><br>
<div class="md-input">
<input class="md-form-control" required="" type="text">
<span class="highlight"></span>
<span class="bar"></span>
<label>User Name</label>
</div>
<div class="md-input">
<input class="md-form-control" required="" type="text">
<span class="highlight"></span>
<span class="bar"></span>
<label>Password</label>
</div>
</div>
</div>
</div>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
.md-input {
position: relative;
margin-bottom: 30px;
}
.md-input .md-form-control {
font-size: 16px;
padding: 10px 10px 10px 5px;
display: block;
border: none;
border-bottom: 2px solid #CACACA;
box-shadow: none;
width: 100%;
}
.md-input label {
color: rgba(0, 0, 0, 0.5);
font-size: 16px;
font-weight: normal;
position: absolute;
pointer-events: none;
left: 5px;
top: 10px;
transition: 0.2s ease all;
-moz-transition: 0.2s ease all;
-webkit-transition: 0.2s ease all;
}
.md-input .bar:before {
left: 50%;
}
.md-input .bar:after {
right: 50%;
}
.md-input .highlight {
position: absolute;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: