summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-backgrounds/animations/background-color-animation-fallback-additive-keyframe.html
blob: 6bb1b8257e73eb7b53969feb1d70f2299e063019 (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
<!DOCTYPE html>
<html class="reftest-wait">
<link rel="help" href="https://drafts.csswg.org/css-backgrounds-3/#background-color">
<link rel="match" href="background-color-animation-fallback-additive-keyframe-ref.html">
<style>
.container {
  width: 100px;
  height: 100px;
  background-color: rgb(0, 200, 0);
}
</style>
<script src="/common/reftest-wait.js"></script>
<body>
<div class="container" id="target"></div>

<script>
var target = document.getElementById("target");
target.animate([
  { backgroundColor: 'rgb(200, 0, 0)', composite: 'accumulate', easing: 'steps(2, end)' },
  { backgroundColor: 'rgb(0, 0, 0' }
], {
  duration: 1000000
});
requestAnimationFrame(() => {
  takeScreenshot();
});
</script>
</body>
</html>