Don't want to learn Bootstrap classes? Go to Bootstrap builder for busy developers.

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

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

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