align-self

介绍

属性指定当前flex行中的flex元素(设置元素在其父元素中的交叉轴方向上的对齐方式),并覆盖align-items的值。

取值

align-self: stretch;
align-self: center;
align-self: flex-start;
align-self: flex-end;
1
2
3
4
  • auto
    默认值。 根据align-items定义的方式对齐。

  • stretch
    弹性元素在交叉轴方向被拉伸到与容器相同的高度或宽度。

  • center
    元素在交叉轴居中。

  • flex-start
    元素在交叉轴上对齐起始位置。

  • flex-end
    元素在交叉轴上对齐结尾位置。

标准化语法

auto | stretch | center | flex-start | flex-end
1
Last Updated: 2022/7/15 下午7:22:06