使用align-content屬性并設(shè)置值為?flex-end,將彈性行設(shè)置在末尾。
示例
您可以嘗試運(yùn)行以下代碼來(lái)實(shí)現(xiàn)?flex-end值
在線演示
<!DOCTYPE html>
<html>
<head>
<style>
.mycontainer {
display: flex;
height: 200px;
background-color: blue;
align-content: flex-end;
flex-wrap: wrap;
}
.mycontainer > div {
background-color: orange;
text-align: center;
line-height: 60px;
font-size: 30px;
width: 100px;
margin: 5px;
}
</style>
</head>
<body>
<h1>Queue</h1>
<div class = "mycontainer">
<div>Q1</div>
<div>Q2</div>
<div>Q3</div>
<div>Q4</div>
<div>Q5</div>
<div>Q6</div>
<div>Q7</div>
<div>Q8</div>
</div>
</body>
</html>
登錄后復(fù)制
以上就是使用 CSS 顯示容器末尾的伸縮線的詳細(xì)內(nèi)容,更多請(qǐng)關(guān)注www.92cms.cn其它相關(guān)文章!






