is now part of Shuffle™. The new editor includes templates for Bootstrap, Bulma, Material-UI, and Tailwind CSS.
Switch to Shuffle →

Bootstrap class: .card-img-top

<div class="card">
  <img class="card-img-top" src="/placeholder/pictures/image.svg" alt="Card image cap">
  <div class="card-body"> Some more card content </div>
</div>

Preview

Card image cap
Some more card content

Check .card-img-top in a real project

Click one of the examples listed below to open the Shuffle Visual Editor with the UI library that uses the selected component.

Tips 💡

Sass source

/* _card.scss:128 */
.card-img-top {
  width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
  @include border-top-radius($card-inner-border-radius);
}

Uses variables

Code copied to the clipboard.

Copying failed

/* _card.scss:128 */
$card-inner-border-radius

More in Bootstrap Cards