1<div class="input-icon-wrap">
2 <span class="input-icon">
3 <span class="fa fa-user"></span>
4
5 </span>
6 <input type="text" class="input-with-icon" id="form-name">
7</div>
8
9
10// css
11.input-icon-wrap {
12 border: 1px solid #ddd;
13 display: flex;
14 flex-direction: row;
15}
16
17.input-icon {
18 background: #ddd;
19}
20
21.input-with-icon {
22 border: none;
23 flex: 1;
24}
25
26.input-icon, .input-with-icon {
27 padding: 10px;
28}
29