HTML
<div class = 'content' >
<div class = 'contentWrapper' >
<div class = 'contentItem' >
<p> Nam1e </p>
<p> Address </p>
<p> Email </p>
<p> Phone </p>
</div>
<div class = 'contentItem' >
<p> Name </p>
<p> Address </p>
<p> Email </p>
<p> Phone </p>
</div>
</div>
</div>
CSS
<style>
.content { display : flex ; justify-content : center ; }
.contentWrapper { display : flex ; }
.contentItem { display : flex ; flex-direction : column ; align-items : center ; box-sizing : border-box ; }
@media ( max-width : 960px )
{ .contentWrapper
{ flex-direction : column ; /* flex-direction: column-reverse; you can use this
for reverse (div-2 above and div-1 below) */
}
}
</style>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…