当我添加旋转木马时,Bootstrap 4中的卡会被搞砸.我的推荐代码是


<div id="testimonial-carousel" class="carousel slide" data-ride="false">
<div class="carousel-inner">
<div class="carousel-item active">
<h2>I no longer have to sniff other dogs for love. I've found the hottest Corgi on TinDog. Woof.</h2>
<img class="testimonial-image" src="images/dog-img.jpg" alt="dog-profile">
<em>Pebbles, New York</em>
</div>
<div class="carousel-item">
<h2 class="testimonial-text">My dog used to be so lonely, but with TinDog's help, they've found the love of their life. I think.</h2>
<img class="testimonial-image" src="images/lady-img.jpg" alt="lady-profile">
<em>Beverly, Illinois</em>
</div>
</div>
<a class="carousel-control-prev" href="#testimonial-carousel" role="button" data-slide="prev">
<span class="carousel-control-prev-icon"> </span>
</a>
<a class="carousel-control-next" href="#testimonial-carousel" role="button" data-slide="next">
<span class="carousel-control-next-icon"> </span>

当我添加这个代码时,所有的汽车都会以混乱的状态转移到顶部。虽然当我去掉这个时,卡片是好的。如何使两者都能正常工作?如有任何帮助,我们将不胜感激。

尝试定义您在旋转木马中使用的图像的大小。宽度和高度应相对于卡片。例如,试试这个。。。

<img class="testimonial-image" src="images/dog-img.jpg" width="50px" height="50px" alt="dog-profile">

最新更新