CSS颠倒两个元素的显示顺序

HTML:

<div id="container">
    <div id="child1">...</div>
    <div is="child2">...</div>
</div>

 

CSS:

#container{
  display: flex;    
  flex-flow: column;
}

#child1{
  order: 2;
}

#child2{
  order: 1;    
}

 

posted @ 2021-02-27 14:32  starlog  阅读(1146)  评论(0编辑  收藏  举报