这是现在的样式,左边有滚动条,右边没有
css">/* styles.css */
.guRpLZ {display: flex;flex-direction: column;
}
.dMItjA {height: 63px;border-bottom: 1px solid var(--TY-Line-1);background-color: rgb(251, 251, 253);
}
.gIoENS {flex: 1 0 0%;display: flex;background-color: #f7f8fc;overflow: hidden;
}
.bXUKwe {width: 100%;height: 100%;overflow: hidden;display: flex;
}
.kShHHP {min-width: 560px;height: 100%;flex: 1 1 0%;position: relative;background-color: #f7f8fc;
}
.docContent {width: 100%;height: calc(100vh - 64px);background-color: #f7f8fc;
}
这是代码,大概都是flex布局加上overflow:srcoll或者hidden,但是右边没有滚动条 ,排查后发现下面这个样式设置了flex布局但是没有高度导致的
修改后加上height就出现滚动条了
总结:如果在flex布局中,希望出现滚动条,保证父元素以及祖先元素要有高度 ,要么有具体的px或者100%