我需要使用Bootstrap 5DIV将一些s 放入其父容器中,无论它是body、表cell还是其他容器div,如附图所示:
如果DIVs 数量为偶数,则它们应占据可用宽度的 50%,并在单行中加上 2。或者,如果DIVs 数量为奇数,则最后一个应占用可用宽度的 100%,而所有先前的仍占用可用宽度的 50%,并按 2 放置在一行中。
最好能够更改DIVs 顺序(如移动视图示例)。
使用UIKit使用一些简单的代码来实现这一点没有问题,例如
<div class="uk-grid">
<div class="uk-width-large-1-2">DIV 1 takes 50% of available width</div>
<div class="uk-width-large-1-2">DIV 2 takes 50% of available width</div>
<div class="uk-width-large-1-2">DIV 3 takes 100% of available width</div>
</div>
Run Code Online (Sandbox Code Playgroud)
但无论我用 Bootstrap 的文档(以及 Stack Overflow)搜索什么,我仍然找不到解决方案。
css responsive-design twitter-bootstrap getuikit bootstrap-5