CSS flex-flow Property

CSS flex-flow Property


CSS flex-flow Property
 
The flex-flow property is shorthand for both flex-direction and flex-wrap. 
 
For example, flex-flow: column wrap specifies that the flex items will flow from top to bottom, wrapping onto a new column if necessary.
 
Syntax -
 
flex-flow: flex-direction flex-wrap|initial|inherit;
 
Where the property values are properties themselves which we have seen before.
 
Now we will see Example -
 
Example -
 

<style>
  .container {
  display: flex;
  flex-flow: row-reverse wrap;
  border: 1px solid black;
  }
  .item,
  .item2,
  .item3,
  .item4,
  .item5,
  .item6 {
  background: rebeccapurple;
  font-size: 2rem;
  padding: 2rem;
  color: white;
  }
  .item2 {
  background: skyblue;
  }
  .item3 {
  background: rgb(153, 0, 255);
  }
  .item4 {
  background: rgb(0, 145, 255);
  }
  .item5 {
  background: rgb(255, 242, 0);
  }
  .item6 {
  background: rgb(255, 0, 153);
  }
</style>
<div class="container">
  <div class="item">1</div>
  <div class="item2">2</div>
  <div class="item3">3</div>
  <div class="item4">4</div>
  <div class="item5">5</div>
  <div class="item6">6</div>
</div>

 
Output-