Bootstrap form input change background color on text enter and revert on empty field
问题 I just need to change the background color in input field when someone fill out the field. If not, keep the default background color. Any method for doing this without extra classes in bootstrap? I tried with but no luck. The background color will disappear when focus out. <div class="form-group"> <input type="text" class="form-control"> </div> .form-control:active, .form-control:focus, .form-control:focus:active { background-color: #96d3ec!important; border-color: #96d3ec; color: white; }