Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-backgrounds/animations/invalidation/background-color-transition-with-initially-transparent.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html class="reftest-wait">
<link rel="match" href="background-color-transition-with-initially-transparent-ref.html">
<style>
.container {
width: 100px;
height: 100px;
transition: background-color 200000ms steps(2) -99999.9ms;
}
</style>
<script src="/common/reftest-wait.js"></script>
<body>
<div class="container" id="target"></div>
<script>
function startTransition() {
requestAnimationFrame(() => {
document.getElementById('target').style.backgroundColor = "rgb(200, 0, 0, 0.8)";
document.getAnimations()[0].ready.then(() => {
requestAnimationFrame(() => {
requestAnimationFrame(() => {
takeScreenshot();
});
});
});
});
}
requestAnimationFrame(startTransition);
</script>
</body>
</html>