我正在编写一个类似trello的界面。我正在尝试让溢出元素-y成为列表的父级。但是,我的背景颜色在列表的父元素的高度被截断了。
屏幕截图:
父级的CSS:
.parent {
width: 80%;
margin-left: 10%;
display: flex;
flex-direction: row;
justify-content: space-between;
overflow-x: scroll;
overflow-y: scroll;
height: 80vh;
}
儿童(列表)的CSS
.list {
background-color: #F5F6F6;
min-width: 275px;
border-radius: 5px;
font-size: 16px;
padding-bottom: 5px;
margin-right: 50px;
height: auto;
overflow: initial;
}
感谢您的帮助!