![]() |
VOOZH | about |
A card is a bordered box with some padding around its content. It includes options for headers, footers, content, colors, etc. Cards include their own variant classes for quickly changing the background color and border color of a card.
Bootstrap 5 Card styles:
Syntax:
<div class="row"> <div class="card text-white" style="max-width: ...rem;"> <div class="card-header">....</div> <div class="card-body"> <h5 class="card-title">....</h5> <p class="card-text">...</p> </div> </div> </div>
Example 1: In this example, we set the background and color of the card, using background classes.
Output:
Example 2: In this example, we set the cards in the horizontal direction and changed the border color.
Output:
Example 3: In this example, we illustrate the cards header, footer, and background color using .card classes.
Output:
Reference: https://getbootstrap.com/docs/5.0/components/card/#card-styles