
批改狀態(tài):合格
老師批語(yǔ):總結(jié) 的很棒 , 注意錯(cuò)別字: flex-directiong, 多一個(gè)g
1.盡量使用語(yǔ)義化標(biāo)簽。
2.能用position
解決的不用float
。
3.css
選擇器盡量用父子選擇器。
4.img
空白邊線處理display:block
。
*row(默認(rèn)值)
:主軸為水平方向,起點(diǎn)在左端。
.items{
flex-direction:row;
}
*row-reverse
:主軸為水平方向,起點(diǎn)在右端。
.items{
flex-direction: row-reverse;
}
*column
:主軸為垂直方向,起點(diǎn)在上沿。
.items{
flex-direction:column;
}
*column-reverse
:主軸為垂直方向,起點(diǎn)在下沿。
.items{
flex-direction:column-reverse;
}
flex-wrap
屬性定義,如果一條線排列不下,是否換行。*nowrap
:默認(rèn)情況,不換行。
.items{
flex-wrap:nowrap;
}
*wrap
:換行,第一行在上方。
.items{
flex-wrap:wrap;
}
*wrap-reverse
:換行,第一行在上方。
.items{
flex-wrap:wrap-reverse;
}
flex-directiong
和flex-wrap
屬性的簡(jiǎn)寫(xiě)形式,默認(rèn)值為row
nowrap
.items{
flex-flow: row nowrap;
}
*flex-start
:默認(rèn)值,左對(duì)齊
.items{
justify-content:flex-start;
}
*flex-end
:右對(duì)齊
.items{
justify-content:flex-end;
}
*center
:居中對(duì)齊
.items{
justify-content:center;
}
*space-between
:兩端對(duì)齊,項(xiàng)目之間的間隔相等。
.items{
justify-content:space-between;
}
*space-around
:每個(gè)項(xiàng)目?jī)蓚?cè)的間隔相等。
.items{
justify-content:space-around;
}
*flex-start
:與交叉軸的起點(diǎn)對(duì)齊
.items{
align-items:flex-start;
}
*flex-end
:與交叉軸的終點(diǎn)對(duì)齊
.items{
align-items:flex-end;
}
*center
:與交叉軸的中點(diǎn)對(duì)齊
.items{
align-items:center;
}
*baseline
:項(xiàng)目第一行的中線對(duì)齊
.items{
align-items:baseline;
}
*stretch
:占滿整個(gè)容器
.items{
align-items:stetch;
}
*flex-start
:與交叉軸的起點(diǎn)對(duì)齊。
.items{
align-content:flex-start;
}
*flex-end
:與交叉軸的終點(diǎn)對(duì)齊
.items{
align-content:flex-end;
}
*center
:與交叉軸的中點(diǎn)對(duì)齊
.items{
align-content:center;
}
*space-between
:與交叉軸兩端對(duì)齊。
.items{
align-content:space-between;
}
*space-around
:每根軸線兩側(cè)的間隔都相等。
.items{
align-content:space-around;
}
*stretch
:默認(rèn)值,軸線占滿整個(gè)交叉軸。
align-content:stretch;
微信掃碼
關(guān)注PHP中文網(wǎng)服務(wù)號(hào)
QQ掃碼
加入技術(shù)交流群
Copyright 2014-2025 http://ipnx.cn/ All Rights Reserved | php.cn | 湘ICP備2023035733號(hào)