Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-masking/clip-path/animations/clip-path-animation-start-time.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html class="reftest-wait">
<link rel="match" href="clip-path-animation-start-time-ref.html">
<style>
.container {
width: 100px;
height: 100px;
background-color: green;
clip-path: inset(25% 25%);
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/web-animations/resources/timing-utils.js"></script>
<body>
<div id="anim" class="container"></div>
<script>
let animation = new Animation(new KeyframeEffect(document.getElementById("anim"),
[
{ clipPath: 'circle(30% at 30% 30%)' },
{ clipPath: 'circle(50% at 50% 50%)' }
],
{
duration: 10000,
easing: 'steps(2, jump-end)',
}), document.timeline);
animation.play();
animation.startTime = document.timeline.currentTime;
requestAnimationFrame(takeScreenshot);
</script>
</body>
</html>