Bs Buttons
Bootstrap Buttons
Button Styles
Bootstrap provides dissimilar styles of buttons:To accomplish the push styles above, Bootstrap has the next classes:
.btn
.btn-default
.btn-primary
.btn-success
.btn-info
.btn-warning
.btn-danger
.btn-link
Example
<button type="button" class="btn">Basic</button>
<button type="button" class="btn btn-default">Default</button>
<button type="button" class="btn btn-primary">Primary</button>
<button type="button" class="btn btn-success">Success</button>
<button type="button" class="btn btn-info">Info</button>
<button type="button" class="btn btn-warning">Warning</button>
<button type="button" class="btn btn-danger">Danger</button>
<button type="button" class="btn btn-link">Link</button>
<a>
, <button>
, or <input>
element:Example
<a href="#" class="btn btn-info" role="button">Link Button</a>
<button type="button" class="btn btn-info">Button</button>
<input type="button" class="btn btn-info" value="Input Button">
<input type="submit" class="btn btn-info" value="Submit Button">
Why practice nosotros rank a # inwards the href attribute of the link?
Since nosotros practice non bring whatsoever page to link it to, in addition to nosotros practice non desire to larn a "404" message, nosotros rank # equally the link inwards our examples. It should last a existent URL to a specific page.
Since nosotros practice non bring whatsoever page to link it to, in addition to nosotros practice non desire to larn a "404" message, nosotros rank # equally the link inwards our examples. It should last a existent URL to a specific page.
Button Sizes
Bootstrap provides iv push sizes:The classes that define the dissimilar sizes are:
.btn-lg
.btn-md
.btn-sm
.btn-xs
Example
<button type="button" class="btn btn-primary btn-lg">Large</button>
<button type="button" class="btn btn-primary btn-md">Medium</button>
<button type="button" class="btn btn-primary btn-sm">Small</button>
<button type="button" class="btn btn-primary btn-xs">XSmall</button>
Block Level Buttons
Influenza A virus subtype H5N1 block flat push spans the entire width of the raise element..btn-block
to create a block flat button:Example
<button type="button" class="btn btn-primary btn-block">Button 1</button>
Active/Disabled Buttons
Influenza A virus subtype H5N1 push tin last railroad train to an active (appear pressed) or a disabled (unclickable) state:The flat
.active
makes a push seem pressed, in addition to the flat .disabled
makes a push unclickable:Example
<button type="button" class="btn btn-primary active">Active Primary</button>
<button type="button" class="btn btn-primary disabled">Disabled Primary</button>
Comments
Post a Comment