其他分享
首页 > 其他分享> > bootstrap5 text左对齐右对齐

bootstrap5 text左对齐右对齐

作者:互联网

bootstrap5 text左对齐右对齐

在bootstrap4中 text左/右对齐

   <h1 class="text-right">右对齐</h1>
   <h1 class="text-left">左对齐</h1>
   <h1 class="text-center">居中</h1>

看了下官网在bootstrap5中就不起作用了
换成text-start和text-end了

<p class="text-start">Start aligned text on all viewport sizes.</p>
<p class="text-center">Center aligned text on all viewport sizes.</p>
<p class="text-end">End aligned text on all viewport sizes.</p>

<p class="text-sm-start">Start aligned text on viewports sized SM (small) or wider.</p>
<p class="text-md-start">Start aligned text on viewports sized MD (medium) or wider.</p>
<p class="text-lg-start">Start aligned text on viewports sized LG (large) or wider.</p>
<p class="text-xl-start">Start aligned text on viewports sized XL (extra-large) or wider.</p>

效果
在这里插入图片描述

标签:text,Start,viewports,bootstrap5,wider,对齐,aligned
来源: https://blog.csdn.net/myt2000/article/details/120303284