Recommended tutorial: Bootstrap tutorial
##Sample code
<div class="input-group"> <div class="input-icon-group"> <input type="text" class="form-control fc-clear" /> <span id="scan" data-role="md" class="md md-center-focus-weak fa-lg input-icon input-icon-md" style="display: inline;"> </span> </div> <span class="input-group-btn"> <button class="btn btn-primary" type="button"> 批号 </button> </span> </div>
Rendering:
Interpretation:
1. First, make them One line mainly contains the "input-group", "
input-icon-group" and "
input-group-btn" attributes that work
input-icon input-icon-md" and "
display: inline".
form-control" works.
fc-clear".
The above is the detailed content of How to add icon to input in bootstrap. For more information, please follow other related articles on the PHP Chinese website!