如何在两个div
元素之间放置垂直线?
.flex-container {
display: -webkit-flex;
margin: 0 auto;
text-align: center;
}
.flex-container .column {
width: 320px;
text-align: center;
}
.vr {
border-left: 2px dotted black;
width: 2px;
margin: 0px 5px 0px 5px;
height: 200px;
}
<div>
<div class="flex-container mt-3 d-flex justify-content-center align-items-center">
<div class="column">Karvat group was established in Mumbai.</div>
<div class="vr "></div>
<div class="column2 bg-alt box arrow-left ml-15 "> 1952</div>
</div>
</div>
2条答案
按热度按时间olmpazwi1#
完成任务的方式真粗糙。
HTML
CSS
输出:
vd8tlhqk2#
下面是它的示例代码,您也可以从在线codepen的https://codepen.io/havardob/pen/dyKoOjX获得一些帮助