[英]Make col center Bootstraps
I create a "col-lg-6 text-center" inside a row but it centered only within the column itself. 我在一行中创建了一个“ col-lg-6 text-center”,但它仅在列中居中。 So I have to add 2 more columns "col-lg-3" to make the col-6 lie at center of the page.
因此,我必须再添加2列“ col-lg-3”,以使col-6位于页面的中心。
<div class="row">
<div class="col-lg-3">
</div>
<div class="col-lg-6 text-center">
<p>Some text</p>
</div>
<div class="col-lg-3">
</div>
</div>
You guys have any way to make the col-lg-6 centered at the page without 2 col-lg-3? 你们有没有办法使col-lg-6居于页面中心而没有2 col-lg-3? I'm very appreciate.
非常感谢。
Use col-lg-offset-3 to add offset of 3 columns at left 使用col-lg-offset-3在左侧添加3列的偏移量
Plunker solution : 柱塞解决方案:
https://plnkr.co/edit/B5Ka3V7BHio0v8ZcMcXr https://plnkr.co/edit/B5Ka3V7BHio0v8ZcMcXr
<div class="row">
<div class="col-lg-offset-3 col-lg-6 text-center">
<p>Some text</p>
</div>
</div>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.