.viewPortFill {
  width: 100vw;
  height: 100vh;
}

.flex {
  display: flex;
}

.flexFill {
  /* // display: -webkit-flex; Safari // Webkit 内核的浏览器，必须加上-webkit前缀。 */
  /* // 注意，设为 Flex 布局以后，子元素的float、clear和vertical-align属性将失效。 */
  display: flex;
  /* // 也就是flex-grow:1,也就是上面说的自动放大填充满剩余空间，若有其他子盒子设置flex，则平分。 */
  flex: 1;
  /* // flex属性是flex-grow, flex-shrink 和 flex-basis的简写，默认值为0 1 auto。后两个属性可选。该属性有两个快捷值：auto (1 1 auto) 和 none (0 0 auto)。建议优先使用这个属性，而不是单独写三个分离的属性，因为浏览器会推算相关值。
  // flex: <flex-grow> <flex-shrink> <flex-basis>;
  // flex: 0 1 auto;
  // flex-grow：放大比例，默认为0，即如果存在剩余空间，也不放大。如果所有项目的flex-grow属性都为1，则它们将等分剩余空间（如果有的话）。
  // flex-shrink：缩小比例，默认为1，即如果空间不足，该项目将缩小。如果所有项目的flex-shrink属性都为1，当空间不足时，都将等比例缩小。如果一个项目的flex-shrink属性为0，其他项目都为1，则空间不足时，前者不缩小。负值对该属性无效。
  // flex-basis：定义了在分配多余空间之前，项目占据的主轴空间（main size）。浏览器根据这个属性，计算主轴是否有多余空间。它的默认值为auto，即项目的本来大小。它可以设为跟width或height属性一样的值（比如350px），则项目将占据固定空间。 */
}

.fill {
  width: 100%;
  height: 100%;
}

.absoluteFill {
  position: absolute;
  top: 0px;
  right: 0px;
  bottom: 0px;
  left: 0px;
}

.relative {
  position: relative;
}

/* // flex-direction属性决定主轴的方向，它可能有4个值：
// row（默认值）：主轴为水平方向，起点在左端。
// row-reverse：主轴为水平方向，起点在右端。
// column：主轴为垂直方向，起点在上沿。
// column-reverse：主轴为垂直方向，起点在下沿。

// flex-wrap属性定义如果一条轴线排不下，如何换行。它可能取三个值：
// nowrap（默认）：不换行。
// wrap：换行，第一行在上方。
// wrap-reverse：换行，第一行在下方。

// flex-flow属性是flex-direction属性和flex-wrap属性的简写形式，默认值为row nowrap。

// justify-content属性定义了项目在主轴上的对齐方式。它可能取5个值，具体对齐方式与轴的方向有关。下面假设主轴为从左到右。
// flex-start（默认值）：左对齐
// flex-end：右对齐
// center： 居中
// space-between：两端对齐，项目之间的间隔都相等。
// space-around：每个项目两侧的间隔相等。所以，项目之间的间隔比项目与边框的间隔大一倍。

// align-items属性定义项目在交叉轴上如何对齐。它可能取5个值。具体的对齐方式与交叉轴的方向有关，下面假设交叉轴从上到下。
// flex-start：交叉轴的起点对齐。
// flex-end：交叉轴的终点对齐。
// center：交叉轴的中点对齐。
// baseline: 项目的第一行文字的基线对齐。
// stretch（默认值）：如果项目未设置高度或设为auto，将占满整个容器的高度。

// align-content属性定义了多根轴线的对齐方式。如果项目只有一根轴线，该属性不起作用。该属性可能取6个值。
// flex-start：与交叉轴的起点对齐。
// flex-end：与交叉轴的终点对齐。
// center：与交叉轴的中点对齐。
// space-between：与交叉轴两端对齐，轴线之间的间隔平均分布。
// space-around：每根轴线两侧的间隔都相等。所以，轴线之间的间隔比轴线与边框的间隔大一倍。
// stretch（默认值）：轴线占满整个交叉轴。


// 项目的属性，以下6个属性设置在项目上：
// order属性定义项目的排列顺序。数值越小，排列越靠前，默认为0。
// flex-grow
// flex-shrink
// flex-basis
// flex
// align-self属性允许单个项目有与其他项目不一样的对齐方式，可覆盖align-items属性。默认值为auto，表示继承父元素的align-items属性，如果没有父元素，则等同于stretch。该属性可能取6个值，除了auto，其他都与align-items属性完全一致。 */

.rowAroundStretch {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
}
.rowAroundCenter {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
}

.rowEvenlyStretch {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
}
.rowEvenlyCenter {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  align-items: center;
}

.rowCenterStretch {
  display: flex;
  flex-direction: row;
  justify-content: center;
}
.rowCenterStart {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
}
.rowCenterCenter {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}
.rowCenterBaseline {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: baseline;
}
.rowCenterEnd {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-end;
}

.rowStartStretch {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
}
.rowStartStart {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: flex-start;
}
.rowStartCenter {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
}
.rowStartEnd {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: flex-end;
}
.rowStartBaseline {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: baseline;
}

.rowEndStretch {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
}
.rowEndStart {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: flex-start;
}
.rowEndCenter {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
}
.rowEndBaseline {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: baseline;
}
.rowEndEnd {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: flex-end;
}

.rowBetweenStretch {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}
.rowBetweenStart {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
}
.rowBetweenCenter {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}
.rowBetweenEnd {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-end;
}
.rowBetweenBaseline {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: baseline;
}

.columnCenterStretch {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.columnCenterStart {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}
.columnCenterCenter {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.columnCenterEnd {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
}

.columnBetweenStretch {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.columnBetweenStart {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
}
.columnBetweenCenter {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.columnStartStretch {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.columnStartStart {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
}
.columnStartCenter {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}
.columnStartEnd {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-end;
}

.columnEndStretch {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.columnEndCenter {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

/*
  align-content属性定义了多根轴线的对齐方式。如果项目只有一根轴线，该属性不起作用。该属性可能取6个值。
  flex-start：与交叉轴的起点对齐。
  flex-end：与交叉轴的终点对齐。
  center：与交叉轴的中点对齐。
  space-between：与交叉轴两端对齐，轴线之间的间隔平均分布。
  space-around：每根轴线两侧的间隔都相等。所以，轴线之间的间隔比轴线与边框的间隔大一倍。
  stretch（默认值）：轴线占满整个交叉轴。
*/
.alignContentStart {
  align-content: flex-start;
}
.alignContentEnd {
  align-content: flex-end;
}
.alignContentCenter {
  align-content: center;
}
.alignContentBetween {
  align-content: space-between;
}
.alignContentAround {
  align-content: space-around;
}
.alignContentStretch {
  align-content: stretch;
}


.wrap {
  flex-wrap: wrap;
}

.noWrap {
  flex-wrap: nowrap;
}

.wholeWidth {
  width: 100%;
}

.wholeHeight {
  height: 100%;
}

.zeroWidth {
  /* // 和flexFill搭配使用可以控制横向的自适应 */
  width: 0%;
}

.zeroHeight {
  /* // 和flexFill搭配使用可以控制纵向的自适应 */
  height: 0%;
}

.halfWidth {
  width: 50%;
}

.mask {
  position: fixed !important;
  top: 0px;
  left: 0px;
  width: 100vw;
  height: 100vh;
  z-index: 998;
  background-color: rgba(0, 0, 0, 0.5);
}
