Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

  • This WPT test may be referenced by the following Test IDs:
<!DOCTYPE html>
<html class="reftest-wait">
<link rel="match" href="background-color-animation-non-zero-size-element-change-to-zero-ref.html">
<style>
.container {
width: 100px;
height: 100px;
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 = '0px';
target.style.height = '0px';
requestAnimationFrame(() => {
takeScreenshot();
});
});
</script>
</body>
</html>