JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
<div class="container-fluid">
<div class="row">
<div class="col"> <h1>HEADER</h1> </div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-4" id="left_column">
<div id="left_column_content">
<h2>left_column_content</h2>
</div>
</div>
<div class="col-8" id="Content">
<h1>CONTENT</h1>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col" id="footer"> <h1>FOOTER</h1> </div>
</div>
</div>
CSS
div {
box-shadow: 0 0 1px #000;
min-height: 100px;
}
#left_column_content {
height: 500px;
transition: 500ms;
}
#Content {
min-height: 1000px;
}
#footer {
height: 500px;
}
JavaScript
var timeoutId;
window.addEventListener('scroll', function(){
clearTimeout(timeoutId);
timeoutId = setTimeout(translate, 500);
});
function translate(){
// Получаем высоту жлементов.
var left_column_height = left_column.offsetHeight;
var left_column_content_height = left_column_content.offsetHeight;
// Вычисляем максимально допустимое смещение
var maxTranslate = left_column_height - left_column_content_height;
// Получаем текущее значение прокрутки
var scrolled = document.documentElement.scrollTop;
// Вычисляем окончательное значение смещения
var translate = (scrolled > maxTranslate) ? maxTranslate : scrolled;
// Смещаем элемент
left_column_content.style.transform = 'translateY(' + translate + 'px)';
}