【发布时间】:2019-03-09 15:07:09
【问题描述】:
我想在左对齐的情况下以相反的顺序显示项目
这是我的工作小提琴,但项目向右对齐。
#main {
width: 400px;
height: 400px;
border: 1px solid #c3c3c3;
display: flex;
flex-direction: row-reverse;
align-items: flex-start;
}
#main div {
width: 50px;
height: 50px;
}
<div id="main">
<div style="background-color:coral;">A</div>
<div style="background-color:lightblue;">B</div>
<div style="background-color:khaki;">C</div>
<div style="background-color:pink;">D</div>
<div style="background-color:lightgrey;">E</div>
<div style="background-color:lightgreen;">F</div>
</div>
谁能帮帮我,提前谢谢。
【问题讨论】:
-
#main { justify-content: flex-end; }是你想要的。
标签: css flexbox alignment direction