Canvas: Difference between revisions
No edit summary |
(→Loop) |
||
Line 11: | Line 11: | ||
</canvas> | </canvas> | ||
See [[Looping with canvas]] | |||
== Template == | == Template == |
Revision as of 15:55, 25 September 2012
The canvas tag was introduced by Apple and has been standardized to become part of HTML5.
To use it, you add the canvas tag to your HTML page, then use javascript draw on it.
<canvas id="canvas" showsrc> function draw() {
c = document.getElementById("canvas"); p = c.getContext("2d"); p.fillRect(50, 50, 150, 150);
} </canvas>
Template
x