1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51

content / test / data / accessibility / scrolling / implicit-root-scroller.html [blame]

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
    <title>Scroll example</title>
    <style type="text/css">
      ::-webkit-scrollbar {
        width: 0px;
        height: 0px;
      }
      body {
        margin: 0;

        position: fixed;
        overflow: hidden;

        width: 100%;
        height: 100%;
      }

      .spage-body{
        position: fixed;
        overflow-y: auto;
        width: 100%;
        height: 100%
      }

      *,
      ::after,
      ::before {
        box-sizing: border-box;
      }
    </style>
  </head>

  <body>
    <div class="spage-body">
      <h1 style="margin-top: 100px">Heading</h1>

      <p>
        Test
      </p>

      <div style="height: 2000px">Spacer</div>
    </div>
    <script>
      document.querySelector('.spage-body').scrollTop = 120;
    </script>
  </body>
</html>