我在这里找到了如何使用flexbox: Flexbox:重新排序和堆叠列
但我不能将我的项目的整个结构更改为flexbox,所以我想知道如果使用bootstrap 4,则可以这样做.
非常感谢你.
我考试不好.
@import url( 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css' );
div {
text-align: center;
height: 60px;
}
#left {
background: yellow;
}
#middle {
background: blue;
}
#right {
background: coral;
}Run Code Online (Sandbox Code Playgroud)
<div class="container">
<div class="row">
<div class="col-sm-3 col-md-3">
<div id="left">COLUMN 1</div>
</div>
<div class="col-sm-6 col-md-6">
<div id="middle">COLUMN 2</div>
</div>
<div class="col-sm-3 col-md-3">
<div id="right">COLUMN 3</div>
</div>
</div>
</div>Run Code Online (Sandbox Code Playgroud)
css flexbox twitter-bootstrap twitter-bootstrap-4 bootstrap-4