我在实施引导轮播时遇到了麻烦。任何人都可以查看以下 html 和 js 并给我有关如何实现幻灯片的说明。.js 未编辑,轮播已安装在 body hero 单元上。我是否实现了轮播 API?如何定义我在 .js 文件中使用的轮播?谢谢。
<div class="carousel">
<!-- Carousel items -->
<div class="carousel-inner">
<!-- Main hero unit for a primary marketing message or call to action -->
<div class="hero-unit">
<h1>Hello, world!</h1>
<p>This is a template for a simple marketing or informational website. It includes a large callout called the hero unit and three supporting pieces of content. Use it as a starting point to create something more unique.</p>
<p><a class="btn btn-primary btn-large">Learn more »</a></p>
</div>
</div>
<!-- Carousel nav -->
<a class="carousel-control left" href="#myCarousel" data-slide="prev">‹</a>
<a class="carousel-control right" href="#myCarousel" data-slide="next">›</a>
</div>