<script> | |
onload = function() { | |
scroller.scrollTop = 200; | |
} | |
</script> | |
<style> | |
.composited { | |
/* Triggers promotion without creating stacking context. */ | |
backface-visibility: hidden; | |
} | |
#scroller { | |
overflow: scroll; | |
height: 200px; | |
width: 200px; | |
} | |
.container { | |
height: 500px; | |
background: red; | |
} | |
.relative { | |
position: relative; | |
top: 225px; | |
height: 50px; | |
background: green; | |
} | |
</style> | |
<div id="scroller" class="composited"> | |
<div class="container"> | |
<div class="relative"></div> | |
</div> | |
</div> |