flex子元素属性
<style>
div {
display: flex;
width: 100%;
height: 500px;
}
span {
width: 200px;
height: 200px;
background-color: aquamarine;
}
span:nth-child(2) {
/* 设置第二个span独占剩余空间 */
flex: 1;
/* 设置第二个元素排列顺序 默认order为1 负数往前排 */
order: -1;
/* 设置该span侧轴的排列 */
align-self: flex-end;
}
</style>
</head>
<body>
<div><span>one</span>
<span>two</span>
<span> </span>
</div>
</body>

浙公网安备 33010602011771号