如您所见,第二张卡片的标题将图像向下推。如何动态调整卡片标题的大小以对齐所有图像?谢谢你。
</head>
<body>
<div class="container-fluid">
<div class="row row-cols-1 row-cols-sm-2 row-cols-md-4">
<div class="col">
<div class="card bg-primary">
<div class="card-body text-center">
<h4 class="card-title">John Doe</h4>
<img class="card-img-top" src="https://www.w3schools.com/bootstrap4/img_avatar1.png" alt="Card image">
<p class="card-text">Some text inside the first card</p>
</div>
</div>
</div>
<div class="col">
<div class="card bg-primary">
<div class="card-body text-center">
<h4 class="card-title">John Doe & other possible long text that pushes the image down </h4>
<img class="card-img-top" src="https://www.w3schools.com/bootstrap4/img_avatar1.png" alt="Card image">
<p class="card-text">Some text inside the second card</p>
</div>
</div>
</div>
<div class="col">
<div class="card bg-primary">
<div class="card-body text-center">
<h4 class="card-title">John Doe </h4>
<img class="card-img-top" src="https://www.w3schools.com/bootstrap4/img_avatar1.png" alt="Card image">
<p class="card-text">Some text inside the third card</p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>