Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<style>
#outer {
scrollbar-width: thin;
overflow: auto;
border: 5px solid black;
background: black;
width: 200px;
height: 400px;
}
#inner {
height: 300px;
}
</style>
<div id="outer">
<div id="inner"></div>
</div>
<script>
// Force a reflow
document.body.offsetHeight;
document.getElementById('outer').style.height = '200px';
</script>