これを見てください:
私が達成しようとしているのは、その内側のスクロールバーの代わりに、メインウィンドウのスクロールバーを使用したいということです。Windowsの垂直スクロールバーを使用して内部のコンテンツを移動できるようにしますinnerContent
が、同時に外側のdiv(content
およびmainContent
)を修正したいと考えています。
それは可能ですか?
CSS
#header {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 50px;
}
#footer {
position: fixed;
left: 0;
bottom:0;
width: 100%;
}
#content {
background-color:#656565;
width: 300px;
margin:0 auto;
padding-top:10px;
border-radius:5px;
}
#mainContent {
margin:0px auto;
background-color:#515151;
width:250px;
border-radius:5px;
padding-top:20px;
}
#contentHolder {
color:#fff;
margin:0 auto;
width:200px;
height: 400px;
background-color:#000000;
border-radius:10px;
overflow:auto;
}
HTML
<div id="header">cfdvfvdfvfv</div>
<div id="content">
<div id="mainContent">
<div id="contentHolder">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam dictum imperdiet lacus in aliquet. Nam leo
risus, bibendum vel varius non, porta vel orci. Integer scelerisque est eu augue tempus lfvdvdfvuctus.
Aliquam erat volutpat. Phasellus vulputate dolor ligula.
</div>
</div>
</div>
<div id="footer"></div>