У меня есть несколько DIV, которые я расположил друг над другом.
Я пытаюсь добиться возможности прокрутки верхнего DIV, а затем, оказавшись внизу DIV, открыть DIV под ним.
Вот где я до сих пор:
https://codepen.io/dadofgage/pen/yMqZaj
<style>
#container {
position: relative;
}
.overlay, .overlay2, .overlay3,
.content{
display:block;
position: absolute;
top: 0;
left: 0;
}
.overlay3{
z-index: 8;
background: #000;
color:#fff
}
.overlay2{
z-index: 9;
background: #c00;
}
.overlay{
z-index: 10;
background: #ccc;
}
</style>
<div id="container">
<div class="overlay3">This is the top div of content. This is the top div of content. This is the top div of content. This is the top div of content. This is the top div of content. This is the top div of content. This is the top div of content. This is the top div of content. This is the top div of content. This is the top div of content. This is the top div of content. This is the top div of content. This is the top div of content. This is the top div of content. This is the top div of content. This is the top div of content. This is the top div of content. This is the top div of content. This is the top div of content. This is the top div of content. This is the top div of content. This is the top div of content. This is the top div of content. This is the top div of content. This is the top div of content. This is the top div of content. This is the top div of content. This is the top div of content. This is the top div of content. This is the top div of content. This is the top div of content. This is the top div of content. </div>
<div class="overlay2">This is the SECOND div of content. This is the SECOND div of content. This is the SECOND div of content. This is the SECOND div of content. This is the SECOND div of content. This is the SECOND div of content. This is the SECOND div of content. This is the SECOND div of content. This is the SECOND div of content. This is the SECOND div of content. This is the SECOND div of content. This is the SECOND div of content. This is the SECOND div of content. This is the SECOND div of content. This is the SECOND div of content. This is the SECOND div of content. This is the SECOND div of content. This is the SECOND div of content. This is the SECOND div of content. This is the SECOND div of content. </div>
<div class="overlay">This is the THIRD div of content. This is the THIRD div of content. This is the THIRD div of content. This is the THIRD div of content. This is the THIRD div of content. This is the THIRD div of content. This is the THIRD div of content. This is the THIRD div of content. This is the THIRD div of content. This is the THIRD div of content. This is the THIRD div of content. This is the THIRD div of content. This is the THIRD div of content. This is the THIRD div of content. This is the THIRD div of content. This is the THIRD div of content. This is the THIRD div of content. This is the THIRD div of content. This is the THIRD div of content. This is the THIRD div of content. This is the THIRD div of content. This is the THIRD div of content. This is the THIRD div of content. This is the THIRD div of content. This is the THIRD div of content. This is the THIRD div of content. This is the THIRD div of content. This is the THIRD div of content. This is the THIRD div of content. This is the THIRD div of content. </div>
<div class="content">This is the BOTTOM div of content. This is the BOTTOM div of content. This is the BOTTOM div of content. This is the BOTTOM div of content. This is the BOTTOM div of content. This is the BOTTOM div of content. This is the BOTTOM div of content. This is the BOTTOM div of content. This is the BOTTOM div of content. This is the BOTTOM div of content. This is the BOTTOM div of content. This is the BOTTOM div of content. This is the BOTTOM div of content. This is the BOTTOM div of content. This is the BOTTOM div of content. This is the BOTTOM div of content. This is the BOTTOM div of content. This is the BOTTOM div of content. This is the BOTTOM div of content. </div>