<h4># flex-wrap:nowrap;(初期値)</h4>
<div class="d-flex fw-nw">
  <div class="box-item">1</div>
  <div class="box-item">2</div>
  <div class="box-item">3</div>
  <div class="box-item">4</div>
</div><hr>

<h4># flex-wrap:wrap;</h4>
<div class="d-flex fw-w">
  <div class="box-item">1</div>
  <div class="box-item">2</div>
  <div class="box-item">3</div>
  <div class="box-item">4</div>
</div><hr>

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

.fw-nw{
  flex-wrap:nowrap;/* 初期値 */
}
.fw-w{
  flex-wrap:wrap;
}
.fw-wr{
  flex-wrap:wrap-reverse;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.