在下面的代码块中, bootstrap 类d-none d-md-block
正在取消d-flex
.
<div class="col-md-6 col-sm-12 custom-right d-none d-md-block d-flex">
<h2 class="align-self-end">Title Here</h2>
</div>
在下面的代码块中, bootstrap 类d-none d-md-block
正在取消d-flex
.
<div class="col-md-6 col-sm-12 custom-right d-none d-md-block d-flex">
<h2 class="align-self-end">Title Here</h2>
</div>
如果我理解正确的话,你根本不应该用d-block
.将其和d-flex
替换为d-md-flex
,以便仅将flex display应用于中等断点及以上.
见https://getbootstrap.com/docs/5.1/utilities/flex/#enable-flex-behaviors和https://getbootstrap.com/docs/5.1/utilities/display/#hiding-elements.