tor-browser

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

direction-default-ref.html (697B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>HTML Canvas Reference: the 'direction' property</title>
      4 <link rel="author" title="Jonathan Kew" href="mailto:jkew@mozilla.com">
      5 <style>
      6 canvas {
      7  margin: 10px;
      8  border: 1px solid gray;
      9 }
     10 </style>
     11 
     12 <canvas id="c" width="300" height="300"></canvas>
     13 
     14 <script>
     15 let ctx = c.getContext("2d");
     16 ctx.font = "16px sans-serif";
     17 ctx.textAlign = "left";
     18 ctx.fillText("Hello World!", 150, 50);
     19 ctx.textAlign = "right";
     20 ctx.fillText("Hello World!", 150, 100);
     21 ctx.textAlign = "start";
     22 ctx.fillText("Hello World!", 150, 150);
     23 ctx.textAlign = "end";
     24 ctx.fillText("Hello World!", 150, 200);
     25 ctx.textAlign = "center";
     26 ctx.fillText("Hello World!", 150, 250);
     27 </script>