1 <!DOCTYPE html>
2 <html lang="it">
3 <head>
4 <meta charset="UTF-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <style>
7 body {
8 margin: 0px;
9 padding: 0px;
10 }
11 </style>
12 </head>
13 <body>
14 <canvas id="myCanvas" width="578" height="200"></canvas>
15 <script>
16 var canvas = document.getElementById('myCanvas');
17 var context = canvas.getContext('2d');
18
19 context.beginPath();
20 context.moveTo(100, 150);
21 context.lineTo(450, 50);
22 context.stroke();
23 </script>
24 </body>
25 </html>
|