summaryrefslogtreecommitdiffstats
path: root/devtools/client/animationinspector/test/doc_pseudo_elements.html
blob: 587608b19d9d0bd05e7673dd618ca26a52c301a9 (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Animated pseudo elements</title>
    <style>
      html, body {
        margin: 0;
        height: 100%;
        width: 100%;
        overflow: hidden;
        display: flex;
        justify-content: center;
        align-items: flex-end;
      }

      body {
        animation: color 2s linear infinite;
        background: #333;
      }

      @keyframes color {
        to {
          filter: hue-rotate(360deg);
        }
      }

      body::before,
      body::after {
        content: "";
        flex-grow: 1;
        height: 100%;
        animation: grow 1s linear infinite alternate;
      }

      body::before {
        background: hsl(120, 80%, 80%);
      }
      body::after {
        background: hsl(240, 80%, 80%);
        animation-delay: -.5s;
      }

      @keyframes grow {
        0% {height: 100%; animation-timing-function: ease-in-out;}
        10% {height: 80%; animation-timing-function: ease-in-out;}
        20% {height: 60%; animation-timing-function: ease-in-out;}
        30% {height: 70%; animation-timing-function: ease-in-out;}
        40% {height: 50%; animation-timing-function: ease-in-out;}
        50% {height: 30%; animation-timing-function: ease-in-out;}
        60% {height: 80%; animation-timing-function: ease-in-out;}
        70% {height: 90%; animation-timing-function: ease-in-out;}
        80% {height: 70%; animation-timing-function: ease-in-out;}
        90% {height: 60%; animation-timing-function: ease-in-out;}
        100% {height: 100%; animation-timing-function: ease-in-out;}
      }
    </style>
  </head>
  <body>
  </body>
</html>