In the preceding chapter, we saw a gist of how buttons are created in Bootstrap. Any anchor tag <a>
or <button
> tag can be made to look like a fancy button using Bootstrap. To create a button, you need to use the class .btn
in combination with many other helper button classes. There are two different types of button classes in Bootstrap: for different sizes and for different colors.
The button classes for different colors are as follows:
btn-primary
: This button class is used for creating a dark-blue buttonbtn-success
: This button class is used for creating a green-colored buttonbtn-warning
: This class is used for creating a pale yellow-colored buttonbtn-default
: This class is used for creating a white-colored buttonbtn-link
: This class is used to make buttons look like a link while preserving the behavior of a button
Let's see the...