Flex layout, and how to set the width of the warp, parent layer adaptively?

.flex{
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  border: 1px solid green;
}

.item{
  margin-bottom: 5px;
  margin-right: 5px;
  background: pink;
  width: 70px;
  height: 50px;
  line-height: 50px;
  text-align: center;
}

 <div class="flex">
   <div class="item">
   </div>
   <div class="item">
   </div>
   ...
 </div>

how the width of the parent layer DIV is not left blank after the line wrapping

Mar.06,2021

use flex: justify-content:space-between;
or refer to this:

this may help you: https://github.com/shaozj/blo.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b38343-2c0ea.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b38343-2c0ea.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?