JSFiddle - React, Tailwind, and code Playground
by yijiang
HTML
<div id="outer">
<div id="content">
</div>
</div>
CSS
#outer {
margin-top: 200px;
overflow-y: hidden;
}
#content {
width: 2000px;
height: 2000px;
background: orange;
}
JavaScript
var minHeight = 200,
last = 0,
container = $('#outer'),
windowHeight = $(window).height();
/*
$('window').scroll(function(){
var now = new Date().getTime();
if(now - last > 100){
last = now;
container.height(Math.max(windowHeight - container.offset().top, minHeight));
}
});*/