我想添加滚动内我的主页面布局有左和右面板。添加可滚动的div flexbox Divs
在右侧面板中,我想滚动div,但整个页面不应该有滚动条。
我也做了以下
body{
height:100vh;
}
.body-container{
backgound: yellow;
display:flex;
flex-wrap: wrap;
}
.left-panel{
background:red;
flex:1;
margin-right:1px;
}
.right-panel{
background:green;
display:flex;
flex-flow:column;
flex:3 0 auto;
}
.content-container{
display:flex;
flex-direction:column;
flex:1;
}
.fixed-header{
background:lightGreen;
}
.scrollable-content{
flex:1;
overflow-y:auto;
background:lightBlue;
}
<div class="body-container">
<div class="left-panel">
<p> Left Panel </p>
</div>
<div class="right-panel">
<p> Right Panel </p>
<div class="content-container">
<div class="fixed-header">
<p> Fixed header </p>
<p> Fixed header </p>
<p> Fixed header </p>
<p> Fixed header </p>
<p> Fixed header </p>
<p> Fixed header </p>
</div>
<div class="scrollable-content">
<p> Scrollable </p>
<p> Scrollable </p>
<p> Scrollable </p>
<p> Scrollable </p>
<p> Scrollable </p>
<p> Scrollable </p>
<p> Scrollable </p>
<p> Scrollable </p>
<p> Scrollable </p>
<p> Scrollable </p>
<p> Scrollable </p>
<p> Scrollable </p>
<p> Scrollable </p>
</div>
</div>
</div>
</div>
任何一个能帮助我吗?