Show the flex lines with spaces all around with CSS

Use the align-content property with value space-around to add space around the flex lines.

You can try to run the following code to implement the space-around value


Live Demo

<!DOCTYPE html>
         .mycontainer {
            display: flex;
            height: 200px;
            background-color: #884EA0;
            align-content: space-around;
            flex-wrap: wrap;
         .mycontainer > div {
            background-color: #00FF00;
            text-align: center;
            line-height: 60px;
            font-size: 30px;
            width: 100px;
            margin: 5px;
      <div class = "mycontainer">