summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-position/sticky/position-sticky-fractional-offset-ref.html
blob: 8b7a1f8a195843b2b943e39813b5e24781955b8d (plain)
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
<!DOCTYPE html>
<style>
  .container {
    width: 100px;
    height: 100px;
    overflow-y: scroll;
    background: lightgreen;
    display: inline-block;
  }
</style>

<div class="container">
  <div style="height: calc(300px + 50px + 10.10px);"></div>
</div>

<div class="container">
  <div style="height: calc(300px + 50px + 10.25px);"></div>
</div>

<div class="container">
  <div style="height: calc(300px + 50px + 10.50px);"></div>
</div>

<div class="container">
  <div style="height: calc(300px + 50px + 10.75px);"></div>
</div>

<div class="container">
  <div style="height: calc(300px + 50px + 10.90px);"></div>
</div>

<script>
  window.onload = function() {
    var containers = document.getElementsByClassName('container');
    for (let i = 0; i < containers.length; i++) {
      containers[i].scrollTo(0, 20);
    }
  };
</script>
</html>