flex-direction: row - children of same height

前端 未结 2 1706
眼角桃花
眼角桃花 2021-01-23 07:44

How is it possible to get the .childs to all have the same height. height: 100% is not working an neither is flex-grow: 1. What is the rec

2条回答
  •  遥遥无期
    2021-01-23 08:29

    .parent {
        display: flex;
        flex-direction: row;
        width: 800px;
        justify-content: center;
        align-items: stretch;
    }
    
    .child {
      width: 150px;
      background-color: green;
      border: solid 1px black;
    }
    Short Text
    Long Text: Bla bla bla Bla bla bla Bla bla bla Bla bla bla Bla bla bla
    Short Text

提交回复
热议问题