BOOTSTRAP3 input Input Box Insert Glyphicon icon method _javascript Tips

Source: Internet
Author: User

Bootstrap3 How do I insert the Glyphicon icon in the Input entry box? The Insert icon looks more eye-catching and meets the user experience values, and this feature applies to major Web sites.

How to put the icon at the beginning of the input box??

<div class= "Form-group has-feedback" >
<label class= "col-md-2 control-label" for= "username" > Username </ label>
<div class= "col-md-6" >
<span class= "Glyphicon glyphicon-user form-control-feedback" > </span>
<input type= "text" class= "Form-control" id= "username" name= "username" placeholder= "username" autofocus>
</div>
</div>
<div class= "Form-group has-feedback" >
<label class= "Col-md-2 control-label" for= "password" > password </label>
<div class= "col-md-6" >
<i> </i>
<span class= "Glyphicon glyphicon-lock form-control-feedback" ></span>
<input type= "Password" class= "Form-control" id= "password" name= "password" placeholder= "password" >
</div>
</div>

------Solutions----------------------

Change the style is good ah, it is done with absolute positioning, left how much, and then change the input box to the padding-left on it

------Solutions----------------------

Style modified Chant

form-control-feedback{
right:0//renamed left:0
}

The above content is small to introduce the BOOTSTRAP3 input input box to insert the Glyphicon icon method, I hope to help you, if you want to learn more content please pay attention to cloud Habitat community website!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.