引导左对齐中心div内的文本 [英] Bootstrap left align text inside centered div
本文介绍了引导左对齐中心div内的文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个4行的段落,在中心的div中是诗歌。因为它是诗歌,我需要左对齐的4行,而不是div的左侧。
这是它是如何居中的:
Lorem ipsum dolor sit amet,
onsectetur adipisicin。
Doloribus,totam unde facilis omnis
temporibus nostrum in
想要它:
Lorem ipsum dolor sit amet,
onsectetur adipisicin。
Doloribus,totam unde facilis omnis
temporibus nostrum in
p>
解决方案
以下是解决方案 http://jsfiddle.net / YW7eS / 2 /
我删除了text-align:center并使用网格系统给您更多的控制。
< div class =col-lg-offset-4 col-lg-4 col-md-offset-4 col-md-4 col-sm- offset-4 col-sm-4>
...
< / div>
I have a paragraph of 4 lines that are poetry in a centered div. Because it is poetry, I need the 4 lines aligned left, but not to the left side of the div.
Here is how it is centered:
Lorem ipsum dolor sit amet,
onsectetur adipisicin.
Doloribus, totam unde facilis omnis
temporibus nostrum in
Here is how I want it:
Lorem ipsum dolor sit amet,
onsectetur adipisicin.
Doloribus, totam unde facilis omnis
temporibus nostrum in
Thanks.
解决方案
Here is the solution http://jsfiddle.net/YW7eS/2/
I removed text-align: center and used the grid system to give you more control.
<div class="col-lg-offset-4 col-lg-4 col-md-offset-4 col-md-4 col-sm-offset-4 col-sm-4">
...
</div>
这篇关于引导左对齐中心div内的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文