小编Mr.*_*ity的帖子

如何在 Angular Bootstrap Carousel 中拥有多个卡片项目?

我正在使用这个轮播

我想要类似这里的多项目轮播的东西。

我尝试按照本教程进行操作,但它最终破坏了我的网站并导致许多错误。

我尝试过的:

<ngb-carousel *ngIf="images">
  <ng-template ngbSlide>
    <div class="row">
      <div class="item card col-md-3" *ngFor="let image of images">
        <img src="{{image.picture}}" class="card-img-top" alt="...">
        <div class="card-body">
          <h5 class="card-title">Card title</h5>
          <p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
          <a href="#" class="btn btn-primary">Go somewhere</a>
        </div>
      </div>
    </div>
  </ng-template>
</ngb-carousel>
Run Code Online (Sandbox Code Playgroud)

它没有达到我想要的效果。我想要同一行中有 2 或 3 个项目可供您滑动。您将如何使用 Angular Bootstrap Carousel 来实现这一目标?

我最后的手段是支付MDB库的费用。我们将非常感谢您的帮助。谢谢。

carousel angular-bootstrap angular

4
推荐指数
1
解决办法
2万
查看次数

标签 统计

angular ×1

angular-bootstrap ×1

carousel ×1