gpt4 book ai didi

html - 使用 flexbox 将一个元素移动到列表的末尾

转载 作者:太空狗 更新时间:2023-10-29 13:23:29 25 4
gpt4 key购买 nike

<分区>

如何使用 CSS 将“3”移动到列表的末尾?

参见 jsbin here

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>

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com