Bootstrap

Responsive Cards

Spring

SPRING

Summer

SUMMER

Autumn

AUTUMN

Winter

WINTER

How to Create Responsive Cards

To create responsive cards using Bootstrap, you can use the built-in card components along with the grid system to ensure they adapt to different screen sizes. Bootstrap's grid system is based on 12 columns, so you can define the number of columns each card should span at various breakpoints.

Here's an example of how to create a responsive layout of cards using Bootstrap 5:

HTML

<div class="container overflow-hidden">
<div class="row justify-content-center">

<div class="col-12 col-sm-6 col-md-4 col-lg-3">
 <div class="card h-100">
  <img class="card-img-top" src="images/spring.jpg" alt="Spring">
   <div class="card-body">
     <p class="card-text">spring.</p>
  </div>
 </div>
</div>

<div class="col-12 col-sm-6 col-md-4 col-lg-3">
 <div class="card h-100">
  <img class="card-img-top" src="images/summer.jpg" alt="Summer">
<div class="card-body">
    <p class="card-text">summer</p>
  </div>
 </div>
</div>

<div class="col-12 col-sm-6 col-md-4 col-lg-3">
 <div class="card h-100">
  <img class="card-img-top" src="images/autumn.jpg" alt="Autumn">
<div class="card-body">
    <p class="card-text">autumn</p>
  </div>
 </div>
</div>

<div class="col-12 col-sm-6 col-md-4 col-lg-3">
 <div class="card h-100">
  <img class="card-img-top" src="images/winter.jpg" alt="Winter">
<div class="card-body">
    <p class="card-text">winter</p>
  </div>
 </div>
</div>

</div>
</div>