This article comprehensively analyzes how to use Bootstrap forms. This article focuses on Bootstrap form styles. For more information, see
I. Basic Forms
In addition to these elements, the form also contains input, select, textarea, and other elements. In the Bootstrap framework, a class name 'form-control' is customized, that is, if these elements use the class name "form-control", some design customization results will be achieved.
1. The width is 100%
2. Set a light gray (# ccc) border.
3. rounded corner with 4px
4. Set the shadow effect. When the element gets the focus, the shadow and border effects change.
5. Set the placeholder color to #999
Ii. Horizontal form
The default form style of the Bootstrap framework is vertical, but most of the time we need the horizontal form style (the label is left and the Form Control is right ).
To implement the horizontal form effect in the Bootstrap framework, the following two conditions must be met:
1.
It is easy to implement this form effect in the Bootstrap framework.
Add the Class Name ". form-inline" to the element.
If you want to add a label before input, it will lead to a line feed display of input. If you must add such a label and do not want the input to wrap it, you need to put the label in the container "form-group.
The above is the first article to fully parse the Bootstrap form usage method. More content will be updated later. I hope you will continue to pay attention to it.