【问题标题】:How to set the number of cards in a row in a card-group in Bootstrap 5?如何在 Bootstrap 5 中设置卡片组中连续卡片的数量?
【发布时间】:2022-10-23 16:36:22
【问题描述】:

如何在 Bootstrap 5 中设置卡片组中连续卡片的数量?我需要连续不超过 5 张牌。怎么做?

【问题讨论】:

  • 尝试用 col-12 包装 5 张卡片。您可能会遇到调整大小的问题。我认为卡片大小不会改变(不确定!)。例如:<div class=Container> <div class=Row> <div class=Col> “5 张卡片”

标签: twitter-bootstrap bootstrap-4 bootstrap-5


【解决方案1】:
    <div class="container"
        <div class="row"> 
            <div class="col">
                Insert card 1 here
            </div>
            <div class="col">
                Insert card 2 here
            </div>
            <div class="col">
                Insert card 3 here
            </div>
            <div class="col">
                Insert card 4 here
            </div>
            <div class="col">
                Insert card 5 here
            </div>
        </div>
    </div>

同样根据需要调整类 col。如果要显示 4 张卡片,请删除一个类 col。

【讨论】:

    猜你喜欢
    • 2019-12-17
    • 2020-07-24
    • 2018-03-21
    • 1970-01-01
    • 2018-08-06
    • 1970-01-01
    • 1970-01-01
    • 2020-04-17
    • 1970-01-01
    相关资源
    最近更新 更多