tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

clip-path-animation-start-time.html (1039B)


      1 <!DOCTYPE html>
      2 <html class="reftest-wait">
      3 <link rel="help" href="https://crbug.com/420284818">
      4 <link rel="help" href="https://drafts.csswg.org/css-shapes-1/#basic-shape-interpolation">
      5 <link rel="match" href="clip-path-animation-start-time-ref.html">
      6 <meta name=fuzzy content="maxDifference=0-10;totalPixels=0-30">
      7 <style>
      8 .container {
      9  width: 100px;
     10  height: 100px;
     11  background-color: green;
     12  clip-path: inset(25% 25%);
     13 }
     14 </style>
     15 <script src="/common/reftest-wait.js"></script>
     16 <script src="/web-animations/resources/timing-utils.js"></script>
     17 <body>
     18 <div id="anim" class="container"></div>
     19 
     20 <script>
     21  let animation = new Animation(new KeyframeEffect(document.getElementById("anim"),
     22    [
     23      { clipPath: 'circle(30% at 30% 30%)' },
     24      { clipPath: 'circle(50% at 50% 50%)' }
     25    ],
     26    {
     27      duration: 10000,
     28      easing: 'steps(2, jump-end)',
     29    }), document.timeline);
     30 
     31    animation.play();
     32    animation.startTime = document.timeline.currentTime;
     33 
     34    requestAnimationFrame(takeScreenshot);
     35 </script>
     36 </body>
     37 </html>