Вот HTML-код < /p>
.parent {
display: flex;
align-items: flex-start;
}
.parent>* {
width: 100%;
}
.child1 {
height: 1000vh;
background-color: cyan;
}
.child2 {
background-color: bisque;
position: relative;
}
.child2>* {
border: 5px solid black;
}
.first {
height: 500px;
}
.last {
background-color: grey;
position: sticky;
top: 0;
height: 500px;
}< /code>
Код: Выделить всё
SOME
AND THERE
Я ожидал>
Подробнее здесь: https://stackoverflow.com/questions/755 ... s-expected