如何使用flex对按钮进行布局?

发布于 7 年前作者 tangxiulan15321 次浏览最后编辑 7 年前来自 ask

如何将图中的三个按钮放在底部

WXOPEN Club 内容图片 WXOPEN Club 内容图片 WXOPEN Club 内容图片
4 回复
chaozou
chaozou1 楼6 年前

<view class=‘item’>

  <view>

    <button>按钮1</button>

  </view>

  <view>

    <button>按钮2</button>

  </view>

  <view>

    <button>按钮3</button>

  </view>

</view>

page{

  width: 100%;

  height: 100%;

  box-sizing: border-box;

}

.item{

  display: flex;

  height: 100%;

  align-items: flex-end;

  justify-content: space-between;

}

.item>view{

  width: 160rpx;

}

xiuying03
xiuying033 楼6 年前

bottom: 0;

luming
luming4 楼5 年前

一直都弄不好