简体   繁体   English

如何使一行中的最后一个 div 溢出到下一行?

[英]How do i make the last div in a row overflow into the next row?

I have 3 rows in my webpage using bootstraps grid.我的网页中有 3 行使用引导程序网格。 The first row has 3 divs of equal width while the next two rows have 2 divs of the same width left aligned.第一行有 3 个等宽的 div,而接下来的两行有 2 个等宽的 div,左对齐。 However, the last div of the first row is longer than the first two divs and I want it to overflow into the second row.但是,第一行的最后一个 div 比前两个 div 长,我希望它溢出到第二行。 How would I do this?我该怎么做?

I have a link here of what I mean: http://imgur.com/a/mxnaH我在这里有我的意思的链接: http : //imgur.com/a/mxnaH

You would have to separate the page in example "content-left, content-right".您必须在示例“内容左,内容右”中分隔页面。 Bootstrap isn't supposed to be used to have rows overflow in to another. Bootstrap 不应该用于让行溢出到另一个行。 So if you give content-left a width of like 8, and content-right 4. That way you can have different heights and make it seem like it's overflowing所以如果你给 content-left 一个像 8 一样的宽度,和 content-right 4。这样你就可以有不同的高度,让它看起来像溢出

Try this grid:试试这个网格:

<div class="container">
  <div class="row">
    <div class="col-8">
      <div class="row">
        <div class="col-6"></div>
        <div class="col-6"></div>
        <div class="col-6"></div>
        <div class="col-6"></div>
      </div>
    </div>
    <div class="col-4"></div>
  </div>
</div>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM