发布网友 发布时间:2022-04-24 05:54
共3个回答
热心网友 时间:2022-04-06 12:14
.parent {
display: flex; /*采用flex布局*/
flex-direction: column; /*纵向排列*/
border: 2px solid #f00;
position: relative;
height: 100%;
padding: 6px;
box-sizing: border-box;
}
热心网友 时间:2022-04-06 13:32
很简单,绿框没有给固定的高度是不会出现滚动条的,因为内容都被撑开了。style里面加上.child{height:200px;}追问child1 高度是不固定的,内容会撑大
热心网友 时间:2022-04-06 15:06
高度不固定随内容变大不会出现滚动条