我如何在引导卡中设置最大项目?

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了我如何在引导卡中设置最大项目?相关的知识,希望对你有一定的参考价值。

我使用boostrap卡显示内容,但是当我使用后端进行循环播放时。刚刚添加的项目和添加在右边的项目。我希望项目在列中设置为3,然后继续向下直接进行。

喜欢这样

<div class="card" style="width: 18rem;">
  <img src="..." 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 class="card" style="width: 18rem;">
  <img src="..." 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 class="card" style="width: 18rem;">
  <img src="..." 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放入容器中,然后尝试使用col-md-12之类的值设置该容器的宽度。

以上是关于我如何在引导卡中设置最大项目?的主要内容,如果未能解决你的问题,请参考以下文章

如何在此模板引导程序 4 中设置悬停下拉菜单

如何在引导程序 4 中设置相同的卡片高度

如何在剃须刀 CheckBoxFor() 中设置引导复选框

如何在 BigQuery 中设置项目默认计费的最大字节数?

如何在引导表中设置单选按钮或复选框的样式?

如何在引导程序中设置 window.alert 样式