tor-browser

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

1912431-emoji-globalAlpha.html (570B)


      1 <!DOCTYPE html>
      2 <html lang="en" >
      3 <head>
      4  <meta charset="utf-8" />
      5 </head>
      6 <body>
      7 
      8 <script>
      9 const canvas = document.createElement("canvas");
     10 canvas.width = 500;
     11 canvas.height = 300;
     12 
     13 document.body.appendChild(canvas);
     14 
     15 const ctx = canvas.getContext('2d');
     16 ctx.font = "20px Arial";
     17 
     18 function createLabel(alpha) {
     19  ctx.globalAlpha = alpha;
     20  ctx.fillText("Text: ABC, Clocks: \ud83d\udd52 \ud83d\udd53 \ud83d\udd54 \ud83d\udd55.", 50, 30 + 200 * alpha);
     21 }
     22 
     23 createLabel(0);
     24 createLabel(0.25);
     25 createLabel(0.5);
     26 createLabel(0.75);
     27 createLabel(1);
     28 </script>
     29 </body>
     30 </html>