例如this code does not work可以证明this pen。切换到Bootstrap 3并将offset-{breakpoint}-*
更改为col-{breakpoint}-offset-*
似乎可行。那是为什么?
答案 0 :(得分:1)
使用Bootstrap 4.0 beta2 - 因为它们仅在此版本中带回了偏移列:
https://codepen.io/svitch/pen/xPVaZw
.row > div {
background-color: #ccc;
outline: 2px solid #777;
outline-offset: -1px;
}
.row > .col, .row > [class^=col-] {
padding-top: .75rem;
padding-bottom: .75rem;
background-color: rgba(86,61,124,.15);
border: 1px solid rgba(86,61,124,.2);
}

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