父容器高度不定,子容器填满父容器剩余高度

1. 实现代码
// scss

// 最外层父容器
.express-detail {
display: flex;
flex-direction: row;
}

// 中间层
.part-two {
display: flex;
justify-content: stretch; // 使充满父容器高度
position: relative;
}

// 最内层子容器
.part-line {
position: absolute;
top: 25px; // 使填满父容器剩余高度
bottom: 0; // 使填满父容器剩余高度
width: 1px;
background: #dddddd;
}
2. 需求分析
(1)目前内容如图:

(2)需求是实现这样:

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理