html - 是否可以在 Bootstrap 框架内证明文本的合理性?

标签 html css twitter-bootstrap

这可能是一个愚蠢的问题,但我敢肯定我不是唯一想知道的人。

我知道对齐类: <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 3Bootstrap 4 中,您可以使用以下内容:

<p class="text-justify">Justified text.</p>

Official documentation

(更新)此功能已从 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/

相关文章:

javascript - 当 ng-app 获取名称时,ng-include 不起作用

html - 导航栏菜单内容溢出到父 div 之外

html - 从HTML动画创建GIF

asp.net - 阻止用户使用 "X"关闭浏览器窗口?

css - HTML/CSS 图像导航栏

javascript - 简单地尝试使用 <span> 字符来调用 javascript 函数来关闭下拉菜单

javascript - 使用 Bootstrap 列时隐藏元素会影响其他不相关的元素

javascript - 如果把angular.js放在body底部会遇到什么问题?

css - 带有部分的标题标签的不同行为

javascript - 如何在用户代理检测后使用 jquery 替换 css