div with display: flex is not centering child div

This question already has an answer here:

  • Flexbox: center horizontally and vertically 8 answers

  • Use justify-content: center . You can find more information here

    #imgBot {
      position: absolute;
      height: 100px;
      width: 100%;
      bottom: 0;
      display: flex;
      flex-direction: row;
      justify-content: center;
    }
    
    .imgBoxBot {
      height: 100px;
      width: 100px;
    }
    <div id="imgBot">
      <div class="imgBoxBot">
        test
      </div>
      <div class="imgBoxBot">
        test
      </div>
    </div>
    链接地址: http://www.djcxy.com/p/76022.html

    上一篇: 我怎样才能将我的两个蓝色框放在这里?

    下一篇: 与显示器的div:flex不是居中的子div