Вот код.
Код: Выделить всё
min-height
body {
height: 100vh;
margin: 0;
}
.container {
height: 100%;
overflow: auto;
display: flex;
flex-direction: column;
}
#child-1 {
min-height: 100%;
background: rgb(255, 179, 179);
}
#child-2 {
min-height: 100%;
background: rgb(135, 135, 232);
z-index: 2;
}
#child-3 {
min-height: 100%;
background: rgb(208, 219, 125);
}
.block {
height: 200px;
width: 50px;
background: rgb(135, 214, 135);
margin-bottom: 10px;
}
Источник: https://stackoverflow.com/questions/781 ... owing-it-g