Flex Flexbox,向右推,左对齐和不同宽度

时间:2017-12-13 14:29:30

标签: css flexbox right-to-left

左边轻松,完成了。

但是右侧部分RESPONSIVE PUSHED右边但左对齐,包括小盒子..看图像:

任何flexbox简单的想法? enter image description here

1 个答案:

答案 0 :(得分:1)

试试这个:



.container {
  display: flex;
  justify-content: space-between;
}

.container > div {
  display: flex;
  flex-direction: column;
}

.right {
  align-items: flex-start;
}

.left {
  align-items: flex-end;
}

.box {
  height: 40px;
  width: 100px;
  border: 1px solid blue;
  margin-bottom: 5px;
}

.wide {
  width: 200px;
}

<div class="container">
  <div class="left">
    <div class="box wide"></div>
    <div class="box"></div>
  </div>

  <div class="right">
    <div class="box wide"></div>
    <div class="box"></div>
  </div>
</div>
&#13;
&#13;
&#13;