溢出-y:滚动是切割背景色

时间:2020-05-18 19:27:44

标签: html css

我正在编写一个类似trello的界面。我正在尝试让溢出元素-y成为列表的父级。但是,我的背景颜色在列表的父元素的高度被截断了。

屏幕截图:

enter image description here Closeup

父级的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;
}

感谢您的帮助!

0 个答案:

没有答案
相关问题