Advertisement
Guest User

html5 canvas sample

a guest
Dec 21st, 2014
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.55 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3.  <head>
  4.   <meta charset="UTF-8">
  5.   <title> Canvas beaty!!</title>
  6.  
  7.   <script type="text/javascript">
  8.     var canvas = document.getElementById("exampleCavas");
  9.     var context = canvas.getContext("2d");
  10.     context.moveTo(0, 0);
  11.     context.lineTo(400, 400);
  12.     context.strokeStyle = "#ff0000";
  13.     context.stroke();      
  14.   </script>
  15. </head>
  16.  
  17. <body>
  18.   Content of the document......
  19.   <canvas id="exampleCanvas" width="500" height="300">
  20.          oh man, your browser is not supporting canvas
  21.   </canvas>
  22. </body>
  23.  
  24. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement