clip-path-animation-set-currenttime-negative.html (1011B)
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-set-currenttime-ref.html"> 5 <style> 6 .container { 7 width: 100px; 8 height: 100px; 9 background-color: green; 10 animation: clippath 10s; 11 animation-fill-mode: none; 12 clip-path: inset(33% 33%); 13 } 14 15 @keyframes clippath { 16 0% { 17 clip-path: circle(50% at 50% 50%); 18 } 19 20 100% { 21 clip-path: circle(35% at 35% 35%); 22 } 23 } 24 </style> 25 <script src="/common/reftest-wait.js"></script> 26 <script src="/web-animations/resources/timing-utils.js"></script> 27 28 <body> 29 <div class="container"> 30 </div> 31 32 <script> 33 let animation = document.getAnimations()[0]; 34 animation.ready.then(() => { 35 // With fill-mode: none, any negative time should return to the previous non-animated style. 36 animation.currentTime = -1000; 37 requestAnimationFrame(takeScreenshot); 38 }); 39 </script> 40 </body> 41 42 </html>