Membuat Tulisan di Canvas pada HTML5

<html>
<head>
<style>
body {
margin: 0px;
padding: 0px;
}
</style>
</head>
<body>
<canvas id="myCanvas" width="578" height="200"></canvas>
<script>
var canvas = document.getElementById('myCanv...

<html>
  <head>
    <style>
      body {
        margin: 0px;
        padding: 0px;
      }
    </style>
  </head> 
  <body>
    <canvas id="myCanvas" width="578" height="200"></canvas>
    <script>
      var canvas = document.getElementById('myCanvas');
      var context = canvas.getContext('2d');

      // do cool things with the context
      context.font = '40pt Calibri';
      context.fillStyle = 'silver';
      context.fillText('Hello World!', 150, 100);
	  context.fillText('Learn HTML5!', 150, 150);
	  context.fillText('Learn HTML5!', 150, 150);
    </script>
  </body>
</html>      
#


About Author

Ardie Jocong

let's we learn coding together ,.. Learning by doing.. cause the best way of learning about anything is by doing. explore your brain ..


Comment & Discussions

    Please LOGIN before if you want to give the comment.