
批改狀態(tài):合格
老師批語:繼續(xù)加油
.box {
/* 容器屬性 */
display: flex;
/* 主軸設(shè)置為縱軸 */
flex-flow: column wrap;
place-content: center;
}
.container {
background-color: lightcyan;
width: 300px;
height: 300px;
text-align: center;
}
.head {
/* outline: auto; */
height: 50px;
width: 300px;
}
.option {
padding: 20px 0 0px;
display: flex;
place-content: space-evenly;
}
.option a {
text-decoration: none;
color: black;
font-weight: bolder;
}
.option a:first-child {
/* 項目屬性 */
/* flex為0的話,這個項目只占據(jù)1個單元個寬度 */
flex: 0;
/* 將第一個項目放置到最后 */
order: 2;
}
.option a:nth-child(2) {
order: 0;
}
.divider {
margin-top: 5px;
height: 10px;
}
hr {
margin-top: 5px;
color: lightgray;
margin: 0 auto;
}
.container > .input {
margin-top: 1em;
}
input {
height: 2em;
width: 250px;
}
.container > .qq {
padding: 2em 15px;
/* 容器屬性 */
place-content: space-between;
font-size: smaller;
}
flex: 放大因子 收縮因子 目標(biāo)寬度;
放大因子 | 收縮因子 | 目標(biāo)寬度 | 結(jié)果 |
---|---|---|---|
1 | 0 | 設(shè)置總目標(biāo)寬度>容器寬度有意義 | 總項目寬度=max(總目標(biāo)寬度,容器寬度) |
1 | 1 | 設(shè)置無效 | 項目寬度撐滿容器 |
0 | 1 | 設(shè)置總目標(biāo)寬度<容器寬度有意義 | 總項目寬度=min(總目標(biāo)寬度,容器寬度) |
其它無單位正值 | 其它無單位正值 | - | 在非平均分配的項目時,對應(yīng)項目所占容器寬度的比例 |
微信掃碼
關(guān)注PHP中文網(wǎng)服務(wù)號
QQ掃碼
加入技術(shù)交流群
Copyright 2014-2025 http://ipnx.cn/ All Rights Reserved | php.cn | 湘ICP備2023035733號