0
Q:

html canvas tutorial

<!-- Answer to: "html canvas tutorial" -->

<canvas id="myCanvas" width="200" height="100"
style="border:1px solid #c3c3c3;">
Your browser does not support the canvas element.
</canvas>

<script>
// Get the element:
var canvas = document.getElementById("myCanvas");
// Create 2D object:
var ctx = canvas.getContext("2d");
// Change the colour to red (#ff0000):
ctx.fillStyle = "#FF0000";
// Make the position of the object (ctx) at (0, 0) and give
// it the height of 75px and the width of 150px:
ctx.fillRect(0,0,150,75);
</script>

<!-- For information, check the source in the corner below -->
1

<canvas id="myCanvas" width="200" height="100"
style="border:1px solid 
#000000;">

</canvas>
 
0
<canvas id="" width="" height=""></canvas>
<script>
	
</script>

<!-- go to chriscourses.com to learn lots -->
-1

New to Communities?

Join the community