我在实现bootstrap轮播功能时遇到了问题。有没有人可以查看以下html和js代码,并给我提供如何实现幻灯片的说明。.js文件未经编辑,轮播安装在body hero unit上。我需要实现轮播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>