오버 플로우 스크롤해야 내용에 귀하의 DIV :
<style>
.content{
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 50%;
overflow: scroll;
}
.the-bg{
background-image: ...;
background-size: cover;
position: absolute;
left: 50%;
top: 0;
bottom: 0;
width: 50%;
}
</style>
<div class="content">lorem ipsum</div>
<div class="the-bg"></div>
또는, 당신은 넣을 수 있습니다 오른쪽 고정형 :
<style>
.content{
float: left;
width: 50%;
}
.the-bg{
background-image: ...;
background-size: cover;
position: fixed;
left: 50%;
top: 0;
bottom: 0;
width: 50%;
}
</style>
<div class="content">lorem ipsum</div>
<div class="the-bg"></div>
출처
2015-01-12 13:16:42
Kup