summaryrefslogtreecommitdiffstats
path: root/devtools/client/animationinspector/test/doc_timing_combination_animation.html
blob: 8b39af015cdbf972faa6755e6d52ba5cb2b2d2b9 (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
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <style>
    div {
      display: inline-block;
      width: 100px;
      height: 100px;
      background-color: lime;
    }
    </style>
  </head>
  <body>
    <script>
    "use strict";

    const delayList = [0, 50000, -50000];
    const endDelayList = [0, 50000, -50000];

    delayList.forEach(delay => {
      endDelayList.forEach(endDelay => {
        const el = document.createElement("div");
        document.body.appendChild(el);
        el.animate({ opacity: [0, 1] },
                   { duration: 200000,
                     iterations: 1,
                     fill: "both",
                     delay: delay,
                     endDelay: endDelay });
      });
    });
    </script>
  </body>
</html>