HTML
xxxxxxxxxx
1
<div class="form-outline">
2
<i class="fas fa-exclamation-circle trailing"></i>
3
<input type="text" id="form1" class="form-control form-icon-trailing" />
4
<label class="form-label" for="form1">Example label</label>
5
</div>
CSS
xxxxxxxxxx
1
.form-outline .form-icon-trailing {
2
padding-right: 0rem!important;
3
padding-left: 2rem!important;
4
}
5
6
.form-outline .trailing {
7
right: auto;
8
left: 10px;
9
}
10
11
.form-outline .form-control~.form-label {
12
left: 2rem!important;
13
}
14
15
.form-outline .form-control.active~.form-label, .form-outline .form-control:focus~.form-label {
16
transform: translateY(-1rem) translateY(.1rem) translateX(-1.2rem) scale(.8);
17
}
JS
1
1
Console errors: 0