summaryrefslogtreecommitdiffstats
path: root/devtools/client/inspector/animation/test/doc_infinity_duration.html
blob: 10d19fc3cfe3113d2d708c4549addf871b05e3dc (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
41
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <style>
    div {
      background-color: lime;
      height: 100px;
    }
    </style>
  </head>
  <body>
    <div class="infinity"></div>
    <div class="infinity-delay-iteration-start"></div>
    <div class="limited"></div>
    <script>
    "use strict";

    document.querySelector(".infinity").animate(
      { opacity: [1, 0] },
      { duration: Infinity }
    );

    document.querySelector(".infinity-delay-iteration-start").animate(
      { opacity: [1, 0] },
      {
        delay: 100000,
        duration: Infinity,
        iterationStart: 0.5,
      }
    );

    document.querySelector(".limited").animate(
      { opacity: [1, 0] },
      {
        duration: 100000,
      }
    );
    </script>
  </body>
</html>