Card – Basic cards with different background colors.
From Bootstrap - Demo Wiki
Component | ||
---|---|---|
Name | Card | |
Description | Basic cards with different background colors. | |
Provider | Skin | |
Note | Cards can also be created by using the "Card" template | |
Reference | getbootstrap.com - card | |
Styling | For all possible color styles and corresponding examples, see colors. |
Primary
- Code
<div class="card text-white bg-primary mb-3" style="max-width: 18rem;">
<div class="card-header">Header</div>
<div class="card-body">
<h5 class="card-title">Primary card title</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
</div>
</div>
- Result
Header
Primary card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Secondary
- Code
<div class="card text-white bg-secondary mb-3" style="max-width: 18rem;">
<div class="card-header">Header</div>
<div class="card-body">
<h5 class="card-title">Secondary card title</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
</div>
</div>
- Result
Header
Secondary card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Success
- Code
<div class="card text-white bg-success mb-3" style="max-width: 18rem;">
<div class="card-header">Header</div>
<div class="card-body">
<h5 class="card-title">Success card title</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
</div>
</div>
- Result
Header
Success card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Danger
- Code
<div class="card text-white bg-danger mb-3" style="max-width: 18rem;">
<div class="card-header">Header</div>
<div class="card-body">
<h5 class="card-title">Danger card title</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
</div>
</div>
- Result
Header
Warning card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Info
- Code
<div class="card text-white bg-info mb-3" style="max-width: 18rem;">
<div class="card-header">Header</div>
<div class="card-body">
<h5 class="card-title">Info card title</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
</div>
</div>
- Result
Header
Info card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Light
- Code
<div class="card bg-light mb-3" style="max-width: 18rem;">
<div class="card-header">Header</div>
<div class="card-body">
<h5 class="card-title">Light card title</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
</div>
</div>
- Result
Header
Light card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Dark
- Code
<div class="card text-white bg-dark mb-3" style="max-width: 18rem;">
<div class="card-header">Header</div>
<div class="card-body">
<h5 class="card-title">Dark card title</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
</div>
</div>
- Result
Header
Dark card title
Some quick example text to build on the card title and make up the bulk of the card's content.