我正在尝试编写一个单页响应式Bootstrap设计的部分,其中有两列并排的文本。设计师希望这两列具有最大宽度,但一旦达到最大值,它就不再居中(因为其余内容仍然是响应式的)。
是否有方法解决这个问题,仍然让这两列文本居中?
编辑:这里是代码的链接:http://www.bootply.com/119539
是否有方法解决这个问题,仍然让这两列文本居中?
编辑:这里是代码的链接:http://www.bootply.com/119539
请试用这个 Bootply。这是您要找的吗?
<div class="row">
<div class="col-lg-12">
<h2 class="center-block">How We Work</h2>
</div>
<div class="col-lg-4 col-lg-offset-2">
<p class="text-justify center-block">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce quis nulla nec lacus condimentum molestie.</p>
</div>
<div class="col-lg-4">
<p class="text-justify center-block">Lorem ipsum dolor sit amet, consectetur adipiscing elit. .</p>
</div>
</div>
h2.center-block{
text-align:center;
}
p.text-justify{
max-width:400px;
}
col-lg-offset-2
将 div 向右移动 2 列。<cufon>
。此外,我看不到你使用了max-width
在哪里。 - Lokesh Suthar