Canvas HTML5

by saravana 2014-04-09 11:56:01

Canvas HTML5
->The <canvas> tag is the only container for graphics.
->It is used to draw graphics using scripting like JavaScript.
->Attributes are height and width.

Syntax
<canvas></canvas>


Example

<canvas id="can"></canvas>

<script>
var canvas=document.getElementById('can');
var ct=canvas.getContext('2d');
ct.fillStyle='#000000';
ct.fillRect(0,0,50,90);
</script>


Note: Internet Explorer 8 and earlier versions do not support.
562
like
0
dislike
0
mail
flag

You must LOGIN to add comments