clip-path-animation-zero-duration.html (957B)
1 <!DOCTYPE html> 2 <html class="reftest-wait"> 3 <link rel="help" href="https://drafts.csswg.org/css-shapes-1/#basic-shape-interpolation"> 4 <link rel="match" href="clip-path-animation-zero-duration-ref.html"> 5 <style> 6 .container { 7 width: 100px; 8 height: 100px; 9 background-color: green; 10 animation: clippath 0s; 11 animation-fill-mode: both; 12 clip-path: inset(25% 25%); 13 } 14 @keyframes clippath { 15 0% { clip-path: circle(50% at 50% 50%); } 16 100% { clip-path: circle(20% at 20% 20%); } 17 } 18 </style> 19 <script src="/common/reftest-wait.js"></script> 20 <script src="/web-animations/resources/timing-utils.js"></script> 21 <body> 22 <div class="container"></div> 23 24 <script> 25 let animation = document.getAnimations()[0]; 26 // A zero-duration animation should be completed as soon as 27 // it is ready. Because the fill mode is set to both, the 28 // resulting style should be the last keyframe of the animation. 29 animation.ready.then(takeScreenshot); 30 </script> 31 </body> 32 </html>