我正在尝试将我的 flexbox 设计为在大屏幕上有 3 列,在移动屏幕上有 2 列(参见下图 1 和 2)。这是我的 JS Fiddle 和我的代码:
https://jsfiddle.net/kwxj83v6/6/
它在大屏幕上工作正常,但无法让它在小屏幕上正确呈现。
<div class="row">
<div class="card col-lg-4 col-xs-6">
<img class="card-img-top" src="..." />
<div class="card-body">
<h6 class="card-title">Semi Truck</h6>
</div>
</div>
<div class="card col-lg-4 col-xs-6">
<img class="card-img-top" src="..." />
<div class="card-body">
<h6 class="card-title">Box Truck</h6>https://jsfiddle.net/kwxj83v6/6/
</div>
</div>
<div class="card col-lg-4 col-xs-6">
<img class="card-img-top" src="..." />
<div class="card-body">
<h6 class="card-title">Dump Truck</h6>
</div>
</div>
<div class="card col-lg-4 col-xs-6">
<img class="card-img-top" src="..." />
<div class="card-body">
<h6 class="card-title">Tow Truck</h6>
</div>
</div>
<div class="card col-lg-4 col-xs-6">
<img class="card-img-top" src="..." />
<div class="card-body">
<h6 class="card-title">Tank Truck</h6>
</div>
</div>
<div class="card col-lg-4 col-xs-6">
<img class="card-img-top" src="..." />
<div class="card-body">
<h6 class="card-title">Pickup Truck</h6>
</div>
</div>
</div>
谢谢