我正试图使用bootsrap来创建一个旋转木马的网页上.我sopied代码和插入的图像,但动画是不是hapenning.只有一张图片,它不会移动.我可能会错过一些非常基本的.谢谢.
<div id="carouselExampleControls" class="carousel slide" data-bs-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active">
<img src="/_assets/carpic1.webp" class="d-block w-100" alt="pic1">
</div>
<div class="carousel-item">
<img src="_assets/carpic2.webp" class="d-block w-100" alt="pic2">
</div>
<div class="carousel-item">
<img src="/_assets/carpic3.webp" class="d-block w-100" alt="pic3">
</div>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleControls" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carouselExampleControls" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
我试着看看我是否遗漏了什么或者我是否复制了完整的代码。它仍然不起作用。
1条答案
按热度按时间czq61nw11#
如果您使用的是Bootstrap 5,请尝试添加这些库
还有这些