Bootstrap 3 Tutorial
Bootstrap offers a variety of button styles:
To achieve the above button styles, Bootstrap has the following classes:
The following example demonstrates the code for the various button styles:
The button classes can be applied to a <a>, <button>, or <input> element.
Why do we put a # in the href attribute of the link?
Because we don’t have a page to link it to and don’t want to receive a “404” notice, we use # as the link in our examples. It should be the actual URL to a certain page.
Bootstrap supports four button sizes:
The classes defining the various sizes are:
The following example demonstrates the code for several button sizes:
A block level button covers the complete width of its parent element.
To build a block-level button, add the class.btn-block.
A button can be made to be active (appear pressed) or disabled (unclickable).
The class .active causes a button to appear pressed, while the class .disabled makes a button unclickable:
CodingAsk.com is designed for learning and practice. Examples may be made simpler to aid understanding. Tutorials, references, and examples are regularly checked for mistakes, but we cannot guarantee complete accuracy. By using CodingAsk.com, you agree to our terms of use, cookie, and privacy policy.
Copyright 2010-2024 by Refsnes Data. All Rights Reserved.