Flex flex-direction屬性

2023-12-13 10:09 更新

flex-direction屬性決定主軸的方向(即項目的排列方向)。

.box {
  flex-direction: row | row-reverse | column | column-reverse;
}

它可能有4個值。

  • row(默認值):主軸為水平方向,起點在左端。
  • row-reverse:主軸為水平方向,起點在右端。
  • column:主軸為垂直方向,起點在上沿。
  • column-reverse:主軸為垂直方向,起點在下沿。


以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號