【发布时间】:2022-07-05 23:32:45
【问题描述】:
我复制了一个 Bootstrap 轮播代码以了解它的工作原理,但该代码并没有给我想要的结果。幻灯片没有移动。第一张幻灯片只是停滞不前。请问你建议我做什么?这是html和css代码。为了更清楚,我还附上了它的屏幕截图。
html
<div class="carousel-inner">
<div class="carousel-item active" style="background-color: red;">
<img src="..." class="d-block w-100" alt="First slide">
</div>
<div class="carousel-item" style="background-color: yellow;">
<img src="..." class="d-block w-100" alt="Second slide">
</div>
<div class="carousel-item" style="background-color: purple;">
<img src="..." class="d-block w-100" alt="Third slide">
</div>
</div>
</div>
css
.carousel-item{
height: 500px;
}
【问题讨论】:
-
欢迎来到 Stack Overflow!,请take the tour,并阅读how to ask、On Topic question,然后查看Question Check list、perfect question 以及如何创建Minimal, Complete and Verifiable Example - 你也复制了 Bootstrap JS 吗?
标签: html css bootstrap-4