clip-path-transition.html (977B)
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-transition-ref.html"> 5 <style> 6 .container { 7 width: 100px; 8 height: 100px; 9 clip-path: circle(50% at 50% 50%); 10 background-color: green; 11 transition-property: clip-path; 12 transition-duration: 20s; 13 transition-timing-function: steps(2, jump-end); 14 transition-delay: -9.999s; 15 } 16 </style> 17 <script src="/common/reftest-wait.js"></script> 18 <script src="../../../../web-animations/resources/timing-utils.js"></script> 19 20 <body> 21 <div class="container" id="target"></div> 22 23 <script> 24 function update() { 25 document.getElementById('target').style.clipPath = "circle(30% at 30% 30%)"; 26 waitForAnimationTime(document.getAnimations()[0], 1).then(takeScreenshot); 27 } 28 requestAnimationFrame(function () { 29 requestAnimationFrame(update); 30 }); 31 </script> 32 </body> 33 34 </html>