这可能是一个愚蠢的问题,但我敢肯定我不是唯一想知道的人。
我知道对齐类:
<p class="text-center">Text Centered within the block element</p>
<p class="text-right">Text aligned to the right within the block element</p>
<p class="text-left">Text aligned to the left within the block element</p>
Twitter 的 Bootstrap 框架中是否有一组类来对齐文本?
例如<p class="text-justify">Sample Text Goes Here</p>
为什么 bootstrap 似乎没有包含实用函数,例如 text-align: justify
?
最佳答案
在 Bootstrap 3 和 Bootstrap 4 中,您可以使用以下内容:
<p class="text-justify">Justified text.</p>
(更新)此功能已从 Bootstrap 5 中移除
Note that we don't provide utility classes for justified text. While, aesthetically, justified text might look more appealing, it does make word-spacing more random and therefore harder to read.
根据官方用户体验建议:不要使用两端对齐的文本! ;)
关于html - 是否可以在 Bootstrap 框架内证明文本的合理性?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19144644/