이 부분을 보시고 http://jsfiddle.net/jaseem/sS7HN/을 보시기 바랍니다. 달성하고자하는 것은 내부 스크롤 막대 대신 기본 창 스크롤 막대를 사용하려는 것입니다. 그래서 나는 "innerContent"안에있는 내용을 살펴보기 위해 창 수직 스크롤 막대를 사용할 수 있지만, 동시에 바깥 쪽 div를 고정시키고 싶습니다. 그게 가능하니?머리글, 바닥 글 및 외부 div를 고정하고 내부 div를 스크롤 가능하게 유지하는 방법
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: 940px;
margin:0 auto;
padding-top:10px;
border-radius:5px;
}
mainContent {
margin:0px auto;
background-color:#515151;
width:660px;
border-radius:5px;
padding-top:20px;
}
contentHolder {
margin:0 auto;
width:616px;
background-color:#000000;
border-radius:10px;
overflow:auto;
}
HTML :
<div id="header"></div>
<div id="content">
<div id="mainContent">
<div id="contentHolder"></div>
</div>
</div>
<div id="footer"></div>
죄송합니다. 이 http://jsfiddle.net/jaseem/sS7HN/을보십시오. 달성하고자하는 것은 내부 스크롤 막대 대신 기본 창 스크롤 막대를 사용하려는 것입니다. 그래서 나는 "innerContent"안에있는 내용을 살펴보기 위해 창 수직 스크롤 막대를 사용할 수 있지만, 동시에 바깥 쪽 div를 고정시키고 싶습니다. 그게 가능하니? – user1846348