Aligning to the bottom in flexbox

前端 未结 2 1194
借酒劲吻你
借酒劲吻你 2020-12-01 20:13

I\'m have containers that should change height dynamically depending on the content. For all containers in a given row, the bottom text should all be fixed to the bottom re

2条回答
  •  甜味超标
    2020-12-01 20:53

    If you change your .caption code to:

    .caption {
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }
    

    and then add:

    .flex-item {
      display: flex;
      flex-direction: column;
    }
    

提交回复
热议问题