Home > Web Front-end > JS Tutorial > Detailed explanation of the three formats for creating forms with Bootstrap (1)_javascript skills

Detailed explanation of the three formats for creating forms with Bootstrap (1)_javascript skills

WBOY
Release: 2016-05-16 15:22:03
Original
1436 people have browsed it

In this chapter, we will learn how to create forms using Bootstrap. Bootstrap can create different styles of forms through some simple HTML tags and extended classes.

Bootstrap form types are divided into three formats: vertical or basic form, inline form, and horizontal form.

Vertical or basic form (display:block;)

The basic form structure comes with Bootstrap, and individual form controls automatically receive some global styles. Listed below are the steps to create a basic form:

Add role="form" to the parent

element.

Place labels and controls in a

with class .form-group. This is necessary to obtain optimal spacing.

Add class .form-control to all text elements ,