<div class="row">
<div class="col-lg-12">
<div class="container-fluid top">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of typ
</p>
</div>
</div>
我已经把col 12给了一个div,但是在给出位置的时候:修正了为什么它是最小尺寸的。为什么我仍然需要给出宽度:100%给div。
发布于 2016-01-01 03:31:08
您的正确架构(并非总是,但在大多数情况下)是:
容器-行-列
所以在这种情况下,它应该是这样的:
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of typ
</p>
</div>
</div>
</div>现在,如果文本没有一直到边缘,是因为col lg-*类有15px的间隔填充。只需删除col-lg-*类,您将得到没有填充的行。
查看我的
编辑
归功于Tim Lewis
容器和容器流体的边距均为15px,行的边距为-15px。请确保不要以-15px或30px的边距结束,这取决于您如何使用它们
发布于 2016-01-01 03:38:45
一个简单的Bootstrap架构,比如
<div class="container-fluid">
...
</div>您可以在http://getbootstrap.com/css/#overview-container上查看更多信息
发布于 2019-10-11 15:41:23
我认为它应该被更正为
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
</div>
</div>
</div>
https://stackoverflow.com/questions/34550731
复制相似问题