css flex

<div class="content">
<div class="con con1">1</div>
<div class="con con2">2</div>
<div class="con con3">3</div>
<div class="con con4">4</div>
</div>
<STYLE>
.content {
display: flex;
flex-direction: column;
width:250px;
}
.con {
width: 50px;
height: 50px;
border:solid 1px red;
}
</STYLE>

<STYLE>
.content {
display: flex;
flex-direction:column-reverse;
width:250px;
    }
.con {
width: 50px;
height: 50px;
border:solid 1px red;
}
</STYLE>

 


posted on 2019-05-15 14:27  忆小样  阅读(127)  评论(0编辑  收藏  举报