<h4># flex-direction:row;(初期値)</h4>
<div class="d-flex dir-r">
  <div class="box-item">1</div>
  <div class="box-item">2</div>
  <div class="box-item">3</div>
</div><hr>

<h4># flex-direction:row-reverse;</h4>
<div class="d-flex dir-rr">
  <div class="box-item">1</div>
  <div class="box-item">2</div>
  <div class="box-item">3</div>
</div><hr>

<h4># flex-direction:column;</h4>
<div class="d-flex dir-c">
  <div class="box-item">1</div>
  <div class="box-item">2</div>
  <div class="box-item">3</div>
</div><hr>

<h4># flex-direction:column-reverse;</h4>
<div class="d-flex dir-cr">
  <div class="box-item">1</div>
  <div class="box-item">2</div>
  <div class="box-item">3</div>
</div><hr>
*{
  box-sizing:border-box;
}
.d-flex{
  display:-wibkit-flex;
  display:flex;
}
.box-item{
  width:50px;
  height:50px;
  background-color:lime;
  border:solid 1px;
  text-align:center;
  padding:12.5px;
  margin:5px;
}

.dir-r{
    flex-direction:row;/* 初期値 */
}
.dir-rr{
    flex-direction:row-reverse;
}
.dir-c{
    flex-direction:column;
}
.dir-cr{
    flex-direction:column-reverse;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.