我想添加滾動內我的主頁面佈局有左和右面板。添加可滾動的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>
任何一個能幫助我嗎?