tor-browser

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

doc_custom_playback_rate.html (593B)


      1 <!DOCTYPE html>
      2 <html lang="en">
      3  <head>
      4    <meta charset="UTF-8">
      5    <style>
      6    div {
      7      background-color: lime;
      8      height: 100px;
      9    }
     10    </style>
     11  </head>
     12  <body>
     13    <script>
     14    "use strict";
     15 
     16    const duration = 100000;
     17 
     18    function createAnimation(cls) {
     19      const div = document.createElement("div");
     20      div.classList.add(cls);
     21      document.body.appendChild(div);
     22      const animation = div.animate([{ opacity: 0 }], duration);
     23      animation.playbackRate = 1.5;
     24    }
     25 
     26    createAnimation("div1");
     27    createAnimation("div2");
     28    </script>
     29  </body>
     30 </html>