我通常不使用引導程序。但我相信你所尋找的是砌體系統,它也可以在引導程序上使用。
這裏爲您提供:
Bootsrap
https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css
HTML
<div class="container">
<h1>Masonry</h1>
<div class="row">
<div class="item col-lg-3">
<div class="well">
<p>Card 1</p>
</div>
</div>
<div class="item col-lg-6">
<div class="well">
<p>Card 2</p>
<p>Card 2</p>
</div>
</div>
<div class="item col-lg-3">
<div class="well">
<p>Card 3</p>
<p>Card 3</p>
<p>Card 3</p>
</div>
</div>
<div class="item col-lg-3">
<div class="well">
<p>Card 4</p>
</div>
</div>
<div class="item col-lg-3">
<div class="well">
<p>Card 5</p>
</div>
</div>
<div class="item col-lg-3">
<div class="well">
<p>Card 6</p>
</div>
</div>
<div class="item col-lg-3">
<div class="well">
<p>Card 7</p>
</div>
</div>
</div>
</div>
CSS
*,
*:before,
*:after {
box-sizing: border-box !important;
}
.row {
-moz-column-width: 18em;
-webkit-column-width: 18em;
column-width: 18em;
-moz-column-gap: 1em;
-webkit-column-gap: 1em;
column-gap: 1em;
}
.item {
display: inline-block;
padding: .25rem;
width: 100%;
}
.well {
position: relative;
display: block;
}
工作小提琴:fiddle
我可能會做一些錯誤:)我不工作。我能看到的是:Local:https://imgur.com/a/Y44Zd - 在你的小提琴鏈接上,它看起來像這樣:https://imgur.com/a/8mBvp – Hardist