<!doctype html> | |
<style> | |
#container { | |
overflow: scroll; | |
width: 400px; | |
height: 300px; | |
background: linear-gradient(black, white); | |
background-attachment: local; | |
will-change: transform; | |
} | |
#child { | |
height: 1000px; | |
width: 10px; | |
} | |
</style> | |
<div id="container"> | |
<div id="child"></div> | |
</div> | |
<script> | |
document.getElementById('container').scrollTop = 1000; | |
</script> |