0

我目前有一个 Bootstrap 4 (beta) 网格设置,它显示 3 个图标,然后在 >sm 屏幕中显示 2 个图标,在 xs 屏幕上它下降到 2x2x1。

我通过标记每一列来实现这一点。但是,有没有办法让每一列 col-sm-3 (我希望它们更小)并强制剩余的图标位于新行上,但也让它们在 xs 屏幕上堆叠 2x2x1?

我有的:

<div id="Customers" class = "container-fluid customersBlock">
  <div class = "row justify-content-center">
    <div class = "col-sm-4 col-6">
          IMG 1
    </div>
    <div class = "col-sm-4 col-6"">
         IMG 2
    </div>
    <div class = "col-sm-4 col-6">
          IMG 3
    </div>
  <div class = "col-sm-4 col-6">
         IMG 4
    </div>
    <div class = "col-sm-4 col-6">
         IMG 5
    </div>
</div>
</div>

我想要的是:

<div id="Customers" class = "container-fluid customersBlock">
  <div class = "row justify-content-center">
    <div class = "col-sm-3 col-6">
          IMG 1
    </div>
    <div class = "col-sm-3 col-6"">
         IMG 2
    </div>
    <div class = "col-sm-3 col-6">
          IMG 3
    </div>

~~ Some way to force columns to next line on >small screens
But on XS Screens still have them stack 2x2x1 ~~

  <div class = "col-sm-3 col-6">
         IMG 4
    </div>
    <div class = "col-sm-3 col-6">
         IMG 5
    </div>
</div>
</div>

4

0 回答 0