html - 如何在 Bootstrap 列之间留出空间?

标签 html css twitter-bootstrap

我在 bootstrap 中有一个两列的行。如何在列之间创建空间。 - 我的第一个列是 8,但我想把它设为 7,并且只有 1 列作为空格。

这是我的 Boot : http://www.bootply.com/mwGajBOEVe

这是我的 HTML。

<div class="container">
    <div class="row">
        <div class="col-md-8">
            <p>The apple tree (Malus domestica) is a deciduous tree in the rose family best known for its sweet, pomaceous fruit, the apple.</p>
        </div>
        <div class="col-md-4"">
        The orange (specifically, the sweet orange) is the fruit of the citrus species Citrus × sinensis in the family Rutaceae.</div>
    </div>
</div>

我应该创建空列来执行此操作吗?

最佳答案

不,使用offsets像这样

<div class="row">
  <div class="col-md-4">.col-md-4</div>
  <div class="col-md-4 col-md-offset-4">.col-md-4 .col-md-offset-4</div>
</div>
<div class="row">
  <div class="col-md-3 col-md-offset-3">.col-md-3 .col-md-offset-3</div>
  <div class="col-md-3 col-md-offset-3">.col-md-3 .col-md-offset-3</div>
</div>
<div class="row">
  <div class="col-md-6 col-md-offset-3">.col-md-6 .col-md-offset-3</div>
</div>

关于html - 如何在 Bootstrap 列之间留出空间?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37039591/

相关文章:

html - 将 Bootstrap 与无响应的 div 内容混合?

html - 如何使图像栏与移动菜单保持在顶部?

php - 根据单击的内容自定义消息

javascript - PDF.JS - 检测页面何时呈现

javascript - 用 css 覆盖默认焦点或重置它

css - 在 CSS calc 中使用 auto

html - 在一行上设置样式而不更改网站上的所有行

css - 使用 CSS 背景图片的响应式图片

css - 如何删除由 sitefinity 或任何其他 CMS 附加的默认 CSS?

javascript - Bootstrap : Using panel heading to collapse panel body