小程序使用弹性布局

100 阅读1分钟

本文已参与「新人创作礼」活动,一起开启掘金创作之路。

page {
  height: 100%;
  width: 100%;
  background-color: #FFF;
  overflow: hidden;
}
/* 行弹性布局容器---行 */
.flex,
.flex-column {
  display: flex;
  flex-direction: row;
  align-items: center;
}
/* 列 */
.flex-column {
  height: 100%;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
}
/*占满剩余部分*/
.flex-fill {
  flex: 1;
}