Principe

Bootstrap met à disposition des cards qui sont des conteneurs de contenu flexibles et extensibles avec de nombreuses options prédéfinies (header, body, footer, img, textes, listes, liens, etc...).

Exemple de contenu simple
...
Card title

Some quick example text to build on the card title and make up the bulk of the card’s content.

Go somewhere
<div class="card" style="width: 18rem;">
    <img src="data/common/img/visual.jpg" class="card-img-top" alt="..." loading="lazy">
    <div class="card-body">
        <h5 class="card-title">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>
        <a href="#" class="btn btn-primary">Go somewhere</a>
    </div>
</div>
Contenus
Body

L'élément de base d'une card est le .card-body.

This is some text within a card body.
<div class="card">
    <div class="card-body">
        This is some text within a card body.
    </div>
</div>
Titres, textes, liens

Les classes suivantes sont disponibles à l'intérieur de .card-body : .card-title, .card-subtitle, .card-text et .card-link.

Card title
Card subtitle

Some quick example text to build on the card title and make up the bulk of the card’s content.

Card link Another link
<div class="card" style="width: 18rem;">
    <div class="card-body">
        <h5 class="card-title">Card title</h5>
        <h6 class="card-subtitle mb-2 text-body-secondary">Card subtitle</h6>
        <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>
        <a href="#" class="card-link">Card link</a>
        <a href="#" class="card-link">Another link</a>
    </div>
</div>
Images

Les images peuvent être gérées avec les arrondis aux bons endroits en utilisant .card-img-top et .card-img-bottom.

...

Some quick example text to build on the card title and make up the bulk of the card’s content.

Some quick example text to build on the card title and make up the bulk of the card’s content.

...
<div class="card" style="width: 18rem;">
    <img src="data/common/img/visual.jpg" class="card-img-top" alt="..." loading="lazy">
    <div class="card-body">
        <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>

<div class="card" style="width: 18rem;">
    <div class="card-body">
        <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>
    <img src="data/common/img/visual.jpg" class="card-img-bottom" alt="..." loading="lazy">
</div>
Groupe de liste
  • An item
  • A second item
  • A third item
<div class="card" style="width: 18rem;">
    <ul class="list-group list-group-flush">
        <li class="list-group-item">An item</li>
        <li class="list-group-item">A second item</li>
        <li class="list-group-item">A third item</li>
    </ul>
</div>
Card header
  • An item
  • A second item
  • A third item
<div class="card" style="width: 18rem;">
    <div class="card-header">Card header</div>
    <ul class="list-group list-group-flush">
        <li class="list-group-item">An item</li>
        <li class="list-group-item">A second item</li>
        <li class="list-group-item">A third item</li>
    </ul>
    <div class="card-footer">Card footer</div>
</div>
Exemple combiné
...
Card title

Some quick example text to build on the card title and make up the bulk of the card’s content.

  • An item
  • A second item
  • A third item
<div class="card" style="width: 18rem;">
    <img src="data/common/img/visual.jpg" class="card-img-top" alt="..." loading="lazy">
    <div class="card-body">
        <h5 class="card-title">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>
    <ul class="list-group list-group-flush">
        <li class="list-group-item">An item</li>
        <li class="list-group-item">A second item</li>
        <li class="list-group-item">A third item</li>
    </ul>
    <div class="card-body">
        <a href="#" class="card-link">Card link</a>
        <a href="#" class="card-link">Another link</a>
    </div>
</div>
Header / Footer

Quelques exemples de mise en oeuvre avec header et footer avec les classes .card-header et .card-footer.

Featured
Special title treatment

With supporting text below as a natural lead-in to additional content.

Go somewhere
<div class="card">
    <div class="card-header">Featured</div>
    <div class="card-body">
        <h5 class="card-title">Special title treatment</h5>
        <p class="card-text">With supporting text below as a natural lead-in to additional content.</p>
        <a href="#" class="btn btn-primary">Go somewhere</a>
    </div>
</div>
Quote

A well-known quote, contained in a blockquote element.

<div class="card">
    <div class="card-header">Quote</div>
    <div class="card-body">
        <figure>
            <blockquote class="blockquote">
                <p>A well-known quote, contained in a blockquote element.</p>
            </blockquote>
            <figcaption class="blockquote-footer">
                Someone famous in <cite title="Source Title">Source Title</cite>
            </figcaption>
        </figure>
    </div>
</div>
Featured
Special title treatment

With supporting text below as a natural lead-in to additional content.

Go somewhere
<div class="card text-center">
    <div class="card-header">Featured</div>
    <div class="card-body">
        <h5 class="card-title">Special title treatment</h5>
        <p class="card-text">With supporting text below as a natural lead-in to additional content.</p>
        <a href="#" class="btn btn-primary">Go somewhere</a>
    </div>
    <div class="card-footer text-body-secondary">2 days ago</div>
</div>
Tailles

Sauf indication contraire, les cards font 100% de la largeur disponible.
Il est possible de disposer des cards en colonnes en utilisant la grille de Bootstrap.

Special title treatment

With supporting text below as a natural lead-in to additional content.

Go somewhere
Special title treatment

With supporting text below as a natural lead-in to additional content.

Go somewhere
<div class="row">
    <div class="col-sm-6 mb-3 mb-sm-0">
        <div class="card">
            <div class="card-body">
                <h5 class="card-title">Special title treatment</h5>
                <p class="card-text">With supporting text below as a natural lead-in to additional content.</p>
                <a href="#" class="btn btn-primary">Go somewhere</a>
            </div>
        </div>
    </div>
    <div class="col-sm-6">
        <div class="card">
            <div class="card-body">
                <h5 class="card-title">Special title treatment</h5>
                <p class="card-text">With supporting text below as a natural lead-in to additional content.</p>
                <a href="#" class="btn btn-primary">Go somewhere</a>
            </div>
        </div>
    </div>
</div>
Alignements du texte
Left (défaut)
Special title treatment

With supporting text below as a natural lead-in to additional content.

Go somewhere
<div class="card mb-3" style="width: 18rem;">
    <div class="card-body">
        <h5 class="card-title">Special title treatment</h5>
        <p class="card-text">With supporting text below as a natural lead-in to additional content.</p>
        <a href="#" class="btn btn-primary">Go somewhere</a>
    </div>
</div>
Center
Special title treatment

With supporting text below as a natural lead-in to additional content.

Go somewhere
<div class="card text-center mb-3" style="width: 18rem;">
    <div class="card-body">
        <h5 class="card-title">Special title treatment</h5>
        <p class="card-text">With supporting text below as a natural lead-in to additional content.</p>
        <a href="#" class="btn btn-primary">Go somewhere</a>
    </div>
</div>
Right (End)
Special title treatment

With supporting text below as a natural lead-in to additional content.

Go somewhere
<div class="card text-end mb-3" style="width: 18rem;">
    <div class="card-body">
        <h5 class="card-title">Special title treatment</h5>
        <p class="card-text">With supporting text below as a natural lead-in to additional content.</p>
        <a href="#" class="btn btn-primary">Go somewhere</a>
    </div>
</div>
Navigation

Possibilité d'ajouter une navigation dans l'en-tête d'une card en associant les possibilités des composants nav de la librairie.

Special title treatment

With supporting text below as a natural lead-in to additional content.

Go somewhere
<div class="card text-center">
    <div class="card-header">
        <ul class="nav nav-tabs card-header-tabs">
            <li class="nav-item">
                <a class="nav-link active" aria-current="true" href="#">Active</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="#">Link</a>
            </li>
            <li class="nav-item">
                <a class="nav-link disabled" aria-disabled="true">Disabled</a>
            </li>
        </ul>
    </div>
    <div class="card-body">
        <h5 class="card-title">Special title treatment</h5>
        <p class="card-text">With supporting text below as a natural lead-in to additional content.</p>
        <a href="#" class="btn btn-primary">Go somewhere</a>
    </div>
</div>
Special title treatment

With supporting text below as a natural lead-in to additional content.

Go somewhere
<div class="card text-center">
    <div class="card-header">
        <ul class="nav nav-pills card-header-pills">
            <li class="nav-item">
                <a class="nav-link active" href="#">Active</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="#">Link</a>
            </li>
            <li class="nav-item">
                <a class="nav-link disabled" aria-disabled="true">Disabled</a>
            </li>
        </ul>
    </div>
    <div class="card-body">
        <h5 class="card-title">Special title treatment</h5>
        <p class="card-text">With supporting text below as a natural lead-in to additional content.</p>
        <a href="#" class="btn btn-primary">Go somewhere</a>
    </div>
</div>
Images

Les cards offrent plusieurs options pour l'intégration d'images.

Première et dernière positions
...
Card title

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

Last updated 3 mins ago

Card title

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

Last updated 3 mins ago

...
<div class="card mb-3">
    <img src="data/common/img/visual.jpg" class="card-img-top" alt="..." loading="lazy">
    <div class="card-body">
        <h5 class="card-title">Card title</h5>
        <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
        <p class="card-text"><small class="text-body-secondary">Last updated 3 mins ago</small></p>
    </div>
</div>
<div class="card">
    <div class="card-body">
        <h5 class="card-title">Card title</h5>
        <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
        <p class="card-text"><small class="text-body-secondary">Last updated 3 mins ago</small></p>
    </div>
    <img src="data/common/img/visual.jpg" class="card-img-bottom" alt="..." loading="lazy">
</div>
Image en arrière plan

Noter qu'il faut ajouter la classe .card-img-overlay sur le conteneur du contenu ainsi que .text-bg-dark sur la balise .card pour gérer la couleur.

...
Card title

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

Last updated 3 mins ago

<div class="card text-bg-dark text-center">
    <img src="data/common/img/visual.jpg" class="card-img" alt="..." loading="lazy">
    <div class="card-img-overlay">
        <h5 class="card-title">Card title</h5>
        <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
        <p class="card-text"><small>Last updated 3 mins ago</small></p>
    </div>
</div>
Mode horizontal

En combinant les classes de grille et des classes utilitaires, il est possible d'afficher des cards horizontalement comme dans l'exemple ci-dessous.

...
Card title

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

Last updated 3 mins ago

<div class="card mb-3">
    <div class="row g-0">
        <div class="col-md-4">
            <img src="data/common/img/visual.jpg" class="img-fluid rounded-start" alt="..." loading="lazy">
        </div>
        <div class="col-md-8">
            <div class="card-body">
                <h5 class="card-title">Card title</h5>
                <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
                <p class="card-text"><small class="text-body-secondary">Last updated 3 mins ago</small></p>
            </div>
        </div>
    </div>
</div>
Style

Possibilité de gérer les couleurs de fond et de texte grâce aux classes .text-bg-*.

Header
Primary card title

Some quick example text to build on the card title and make up the bulk of the card’s content.

Header
Secondary card title

Some quick example text to build on the card title and make up the bulk of the card’s content.

Header
Success card title

Some quick example text to build on the card title and make up the bulk of the card’s content.

Header
Danger card title

Some quick example text to build on the card title and make up the bulk of the card’s content.

Header
Warning card title

Some quick example text to build on the card title and make up the bulk of the card’s content.

Header
Info card title

Some quick example text to build on the card title and make up the bulk of the card’s content.

Header
Light card title

Some quick example text to build on the card title and make up the bulk of the card’s content.

Header
Dark card title

Some quick example text to build on the card title and make up the bulk of the card’s content.

<div class="card text-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>
<div class="card text-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>
<div class="card text-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>
<div class="card text-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>
<div class="card text-bg-warning mb-3" style="max-width: 18rem;">
    <div class="card-header">Header</div>
    <div class="card-body">
        <h5 class="card-title">Warning 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>
<div class="card text-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>
<div class="card text-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>
<div class="card text-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>
Bordures

Possibilité de skinner les bordures avec les classes .border-*.

Header
Primary card title

Some quick example text to build on the card title and make up the bulk of the card’s content.

Header
Secondary card title

Some quick example text to build on the card title and make up the bulk of the card’s content.

Header
Success card title

Some quick example text to build on the card title and make up the bulk of the card’s content.

Header
Danger card title

Some quick example text to build on the card title and make up the bulk of the card’s content.

Header
Warning card title

Some quick example text to build on the card title and make up the bulk of the card’s content.

Header
Info card title

Some quick example text to build on the card title and make up the bulk of the card’s content.

Header
Light card title

Some quick example text to build on the card title and make up the bulk of the card’s content.

Header
Dark card title

Some quick example text to build on the card title and make up the bulk of the card’s content.

<div class="card border-primary mb-3" style="max-width: 18rem;">
    <div class="card-header">Header</div>
    <div class="card-body text-primary">
        <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>
<div class="card border-secondary mb-3" style="max-width: 18rem;">
    <div class="card-header">Header</div>
    <div class="card-body text-secondary">
        <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>
<div class="card border-success mb-3" style="max-width: 18rem;">
    <div class="card-header">Header</div>
    <div class="card-body text-success">
        <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>
<div class="card border-danger mb-3" style="max-width: 18rem;">
    <div class="card-header">Header</div>
    <div class="card-body text-danger">
        <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>
<div class="card border-warning mb-3" style="max-width: 18rem;">
    <div class="card-header">Header</div>
    <div class="card-body">
        <h5 class="card-title">Warning 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>
<div class="card border-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>
<div class="card border-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>
<div class="card border-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>
Groupe de cards

Possibilité de regrouper plusieurs cards dans .card-group.

...
Card title

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

Last updated 3 mins ago

...
Card title

This card has supporting text below as a natural lead-in to additional content.

Last updated 3 mins ago

...
Card title

This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.

Last updated 3 mins ago

<div class="card-group">
    <div class="card">
        <img src="data/common/img/visual.jpg" class="card-img-top" alt="..." loading="lazy">
        <div class="card-body">
            <h5 class="card-title">Card title</h5>
            <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
            <p class="card-text"><small class="text-body-secondary">Last updated 3 mins ago</small></p>
        </div>
    </div>
    <div class="card">
        <img src="data/common/img/visual.jpg" class="card-img-top" alt="..." loading="lazy">
        <div class="card-body">
            <h5 class="card-title">Card title</h5>
            <p class="card-text">This card has supporting text below as a natural lead-in to additional content.</p>
            <p class="card-text"><small class="text-body-secondary">Last updated 3 mins ago</small></p>
        </div>
    </div>
    <div class="card">
        <img src="data/common/img/visual.jpg" class="card-img-top" alt="..." loading="lazy">
        <div class="card-body">
            <h5 class="card-title">Card title</h5>
            <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.</p>
            <p class="card-text"><small class="text-body-secondary">Last updated 3 mins ago</small></p>
        </div>
    </div>
</div>
Alignement des footers

Avec ces techniques, il est possible d'aligner les footer des cards sur la même ligne.

...
Card title

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

...
Card title

This card has supporting text below as a natural lead-in to additional content.

...
Card title

This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.

<div class="card-group">
    <div class="card">
        <img src="data/common/img/visual.jpg" class="card-img-top" alt="..." loading="lazy">
        <div class="card-body">
            <h5 class="card-title">Card title</h5>
            <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
        </div>
        <div class="card-footer">
            <small class="text-body-secondary">Last updated 3 mins ago</small>
        </div>
    </div>
    <div class="card">
        <img src="data/common/img/visual.jpg" class="card-img-top" alt="..." loading="lazy">
        <div class="card-body">
            <h5 class="card-title">Card title</h5>
            <p class="card-text">This card has supporting text below as a natural lead-in to additional content.</p>
        </div>
        <div class="card-footer">
            <small class="text-body-secondary">Last updated 3 mins ago</small>
        </div>
    </div>
    <div class="card">
        <img src="data/common/img/visual.jpg" class="card-img-top" alt="..." loading="lazy">
        <div class="card-body">
            <h5 class="card-title">Card title</h5>
            <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.</p>
        </div>
        <div class="card-footer">
            <small class="text-body-secondary">Last updated 3 mins ago</small>
        </div>
    </div>
</div>
Grid cards

Exemples d'utilisations de la mécanique de grille avec .row et .col pour répartir et gérer les alignements de plusieurs cards sur plusieurs lignes et colonnes.

...
Card title

This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

...
Card title

This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

...
Card title

This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

...
Card title

This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

<div class="row row-cols-1 row-cols-md-2 g-4 mb-4">
    <div class="col">
        <div class="card">
            ...
        </div>
    </div>
    <div class="col">
        <div class="card">
            ...
        </div>
    </div>
    <div class="col">
        <div class="card">
            ...
        </div>
    </div>
    <div class="col">
        <div class="card">
            ...
        </div>
    </div>
</div>
...
Card title

This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

...
Card title

This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

...
Card title

This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

...
Card title

This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

...
Card title

This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

<div class="row row-cols-1 row-cols-md-3 g-4">
    <div class="col">
        <div class="card">
            ...
        </div>
    </div>
    <div class="col">
        <div class="card">
            ...
        </div>
    </div>
    <div class="col">
        <div class="card">
            ...
        </div>
    </div>
    <div class="col">
        <div class="card">
            ...
        </div>
    </div>
    <div class="col">
        <div class="card">
            ...
        </div>
    </div>
</div>
Hauteurs homogènes

Pour ajouter des hauteurs égales, il suffit d'ajouter .h-100 sur chaque card.
Pour avoir ce comportement par défaut, configurez $card-height:100% dans le fichier de configuration SASS.

...
Card title

This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

...
Card title

This is a short card.

...
Card title

This is a longer card with supporting text below as a natural lead-in to additional content.

...
Card title

This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

<div class="row row-cols-1 row-cols-md-3 g-4 mb-4">
    <div class="col">
        <div class="card h-100">
            <img src="data/common/img/visual.jpg" class="card-img-top" alt="..." loading="lazy">
            <div class="card-body">
                <h5 class="card-title">Card title</h5>
                <p class="card-text">This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
            </div>
        </div>
    </div>
    <div class="col">
        <div class="card h-100">
            <img src="data/common/img/visual.jpg" class="card-img-top" alt="..." loading="lazy">
            <div class="card-body">
                <h5 class="card-title">Card title</h5>
                <p class="card-text">This is a short card.</p>
            </div>
        </div>
    </div>
    <div class="col">
        <div class="card h-100">
            <img src="data/common/img/visual.jpg" class="card-img-top" alt="..." loading="lazy">
            <div class="card-body">
                <h5 class="card-title">Card title</h5>
                <p class="card-text">This is a longer card with supporting text below as a natural lead-in to additional content.</p>
            </div>
        </div>
    </div>
    <div class="col">
        <div class="card h-100">
            <img src="data/common/img/visual.jpg" class="card-img-top" alt="..." loading="lazy">
            <div class="card-body">
                <h5 class="card-title">Card title</h5>
                <p class="card-text">This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
            </div>
        </div>
    </div>
</div>

À noter que les footer s'aligneront également avec cette technique.

...
Card title

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

...
Card title

This card has supporting text below as a natural lead-in to additional content.

...
Card title

This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.

<div class="row row-cols-1 row-cols-md-3 g-4">
    <div class="col">
        <div class="card h-100">
            <img src="data/common/img/visual.jpg" class="card-img-top" alt="..." loading="lazy">
            <div class="card-body">
                <h5 class="card-title">Card title</h5>
                <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
            </div>
            <div class="card-footer">
                <small class="text-body-secondary">Last updated 3 mins ago</small>
            </div>
        </div>
    </div>
    <div class="col">
        <div class="card h-100">
            <img src="data/common/img/visual.jpg" class="card-img-top" alt="..." loading="lazy">
            <div class="card-body">
                <h5 class="card-title">Card title</h5>
                <p class="card-text">This card has supporting text below as a natural lead-in to additional content.</p>
            </div>
            <div class="card-footer">
                <small class="text-body-secondary">Last updated 3 mins ago</small>
            </div>
        </div>
    </div>
    <div class="col">
        <div class="card h-100">
            <img src="data/common/img/visual.jpg" class="card-img-top" alt="..." loading="lazy">
            <div class="card-body">
                <h5 class="card-title">Card title</h5>
                <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.</p>
            </div>
            <div class="card-footer">
                <small class="text-body-secondary">Last updated 3 mins ago</small>
            </div>
        </div>
    </div>
</div>
CSS

Aperçu des variables CSS et SASS.

Variables CSS
--#{$prefix}card-spacer-y: #{$card-spacer-y};
--#{$prefix}card-spacer-x: #{$card-spacer-x};
--#{$prefix}card-title-spacer-y: #{$card-title-spacer-y};
--#{$prefix}card-title-color: #{$card-title-color};
--#{$prefix}card-subtitle-color: #{$card-subtitle-color};
--#{$prefix}card-border-width: #{$card-border-width};
--#{$prefix}card-border-color: #{$card-border-color};
--#{$prefix}card-border-radius: #{$card-border-radius};
--#{$prefix}card-box-shadow: #{$card-box-shadow};
--#{$prefix}card-inner-border-radius: #{$card-inner-border-radius};
--#{$prefix}card-cap-padding-y: #{$card-cap-padding-y};
--#{$prefix}card-cap-padding-x: #{$card-cap-padding-x};
--#{$prefix}card-cap-bg: #{$card-cap-bg};
--#{$prefix}card-cap-color: #{$card-cap-color};
--#{$prefix}card-height: #{$card-height};
--#{$prefix}card-color: #{$card-color};
--#{$prefix}card-bg: #{$card-bg};
--#{$prefix}card-img-overlay-padding: #{$card-img-overlay-padding};
--#{$prefix}card-group-margin: #{$card-group-margin};
Variables SASS
$card-spacer-y:                     $spacer;
$card-spacer-x:                     $spacer;
$card-title-spacer-y:               $spacer * .5;
$card-title-color:                  null;
$card-subtitle-color:               null;
$card-border-width:                 var(--#{$prefix}border-width);
$card-border-color:                 var(--#{$prefix}border-color-translucent);
$card-border-radius:                var(--#{$prefix}border-radius);
$card-box-shadow:                   null;
$card-inner-border-radius:          subtract($card-border-radius, $card-border-width);
$card-cap-padding-y:                $card-spacer-y * .5;
$card-cap-padding-x:                $card-spacer-x;
$card-cap-bg:                       rgba(var(--#{$prefix}body-color-rgb), .03);
$card-cap-color:                    null;
$card-height:                       null;
$card-color:                        null;
$card-bg:                           var(--#{$prefix}body-bg);
$card-img-overlay-padding:          $spacer;
$card-group-margin:                 $grid-gutter-width * .5;