r: purple;
    overflow: hidden;
    position: relative;
  }
  #child {
    width: 400px;
    height: 400px;
    background-color: green;
    position: absolute;
    left: 0px;
    top: 0px;
  }
</style>
<div id="scroller">
  <div id="space" style="height:400%; width: 400%"></div>
  <div id="child"></div>
</div>
<script>
  const scroller = document.getElementById("scroller");
  const child = document.getElementById("child");

  function test_alignment(alignment, start_offset, expected_offset) {
    scroller