<!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-zero-size-element-change-to-non-zero-ref.html">
<style>
.container {
  animation: bgcolor 1000000s cubic-bezier(0,1,1,0) -500000s;
}
@keyframes bgcolor {
  0% { background-color: rgb(0, 200, 0); }
  100% { background-color: rgb(200, 0, 0); }
}
</style>
<script src="/common/reftest-wait.js"></script>
<body>
<div class="container" id="target"></div>

<script>
requestAnimationFrame(() => {
  var target = document.getElementById("target");
  target.style.width = '100px';
  target.style.height = '100px';
  requestAnimationFrame(() => {
    takeScreenshot();
  });
});
</script>
</body>
</html>
