如何使用 bootstrap 将内容左对齐或右对齐?
How to align content to the left or right using bootstrap?
我正在尝试实现与 paypal.com 页面相似的外观。我无法正确对齐我的某些内容。每个部分都有一个封面背景,但我需要内容左右移动。
在 bootstrap 中有一些特定的 类 文本对齐方式
.text-left{
/* Text align left */
}
.text-right{
/* Text align right*/
}
.text-center{
/* Text align center*/
}
Using above mentioned classes you can align content aswell as
inline-elements in your layout. you should also check bootstrap documentation on the same topic http://getbootstrap.com/css/#type-alignment
我不太确定你想要达到什么目的。你应该详细一点,更好一点,以便我们可以提供帮助
.text-center, .text-right, .text-left, .pull-right, .pull-left
bootstrap 中的所有辅助方法都用于定位,也考虑使用网格
注意:这已在 Bootstrap 3.
中删除
Pre-Bootstrap 3,你可以像这样使用 CSS class pagination-centered:
<div class="span12 pagination-centered">
Centered content.
</div>
Class pagination-centered 已经在 bootstrap.css(或 bootstrap.min.css)中并且只有一个规则:
.pagination-centered{text-align:center;}
使用 Bootstrap 2.3.0。只需使用 class text-center
我不是 100% 理解你的问题,但是按照 paypal.com 中的要求修改你的 div 如下
<div class="pull-right section col-md-6 light text-left">
添加"pull-right"并使其成为"text-left"
希望对您有所帮助!!!
我正在尝试实现与 paypal.com 页面相似的外观。我无法正确对齐我的某些内容。每个部分都有一个封面背景,但我需要内容左右移动。
在 bootstrap 中有一些特定的 类 文本对齐方式
.text-left{
/* Text align left */
}
.text-right{
/* Text align right*/
}
.text-center{
/* Text align center*/
}
Using above mentioned classes you can align content aswell as inline-elements in your layout. you should also check bootstrap documentation on the same topic http://getbootstrap.com/css/#type-alignment
我不太确定你想要达到什么目的。你应该详细一点,更好一点,以便我们可以提供帮助
.text-center, .text-right, .text-left, .pull-right, .pull-left
bootstrap 中的所有辅助方法都用于定位,也考虑使用网格
注意:这已在 Bootstrap 3.
中删除Pre-Bootstrap 3,你可以像这样使用 CSS class pagination-centered:
<div class="span12 pagination-centered">
Centered content.
</div>
Class pagination-centered 已经在 bootstrap.css(或 bootstrap.min.css)中并且只有一个规则:
.pagination-centered{text-align:center;}
使用 Bootstrap 2.3.0。只需使用 class text-center
我不是 100% 理解你的问题,但是按照 paypal.com 中的要求修改你的 div 如下
<div class="pull-right section col-md-6 light text-left">
添加"pull-right"并使其成为"text-left"
希望对您有所帮助!!!