あなたはフレックスレイアウトとブートストラップ4のスーパーのアクセス権を持って、ちょうど擬似要素を使って余分な労力を与える:前/ :後に。
CSS:
.col {
margin: 1em;
position: relative;
}
.bottom-border:after {
content: '';
width: calc(100% - 1em);
height: 2px;
background-color: grey;
position: absolute;
box-sizing: border-box;
bottom: -1em;
left: 0
}
.right-border:after {
content: '';
height: 100%;
width: 2px;
background-color: grey;
position: absolute;
box-sizing: border-box;
right: -1em;
bottom: 0;
}
.left-border:after {
content: '';
height: 100%;
width: 2px;
background-color: grey;
position: absolute;
box-sizing: border-box;
left: -1em;
top: 0;
}
.top-border:after {
content: '';
width: calc(100% - 1em);
height: 2px;
background-color: grey;
position: absolute;
box-sizing: border-box;
top: -1em;
right: 0
}
とHTML:
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" rel="stylesheet" />
<div class="tab-section text-center">
<div class="row">
<div class="col right-border">
<div>
<h2>$ 2,300</h2> Today's Revenue
</div>
</div>
<div class="col bottom-border">
<div>
<h2>$ 53,100</h2>Expected Revenue for this month
</div>
</div>
</div>
<div class="row">
<div class="col top-border">
<div>
<h2>12</h2> Bookings taken today
</div>
</div>
<div class="col left-border">
<div>
<h2>68%</h2>Total Monthly occupancy
</div>
</div>
</div>
</div>
プレビューリンク:https://codepen.io/ziruhel/pen/EbKByd
だから、右のデザインは、例えば、画像のように見てみたいです? – CapeAndCowl
@CapeAndCowlはい、私はそれを試してみますが、私はそれを正しく行うことはできません。良いデザイナーではありません。 – core114
私はあなたのためにこのリンクを参照してください:https://codepen.io/ziruhel/pen/EbKByd より多くの変更が必要です、私に教えてください。 私はすでにそれに答える。 –