我试图使一些文本中心,仅在小视口大小和以下。宽过小应左对齐。由于某些原因,当我连续缩小视口时,文本左对齐.
<div class="row">
<div id="box" class="col-md-6 offset-md-3 col-sm-12 text-md-left text-sm-center">
Center me on col-sm, otherwise, left align me
</div>
</div>
#box{
width:600px;
height:200px;
border:1px solid black;
}发布于 2021-07-28 15:40:36
使用引导带5,您需要使用text-sm-start
<div class="row">
<div id="box" class="col-md-6 col-sm-12 offset-md-3 text-center text-sm-start">
Center me on col-sm, otherwise, left align me
</div>
</div>https://stackoverflow.com/questions/68563289
复制相似问题