8
如何將「3」移動到使用CSS的列表末尾?將一個元素移到帶有flexbox的列表的末尾
ul {
display: flex;
list-style: none;
margin: 0;
padding: 0;
}
li {
border: 1px solid black;
display: inline-block;
width: 50px;
height: 50px;
line-height: 50px;
text-align: center;
}
.end {
align-self: flex-end; /* this doesn't work; how can I move 3 to the end? */
}
<ul>
<li class="end">3</li>
<li>1</li>
<li>2</li>
</ul>