Permalink
Browse files

Start with a blue box on a canvas.

  • Loading branch information...
0 parents commit b4e970826f682164b02ecf2ba0f7a71b751c5149 @wtaysom committed Feb 25, 2012
Showing with 19 additions and 0 deletions.
  1. +12 −0 basics.html
  2. +5 −0 basics.js
  3. +2 −0 notes.txt
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>Canvas Basics</title>
+</head>
+<body>
+ <canvas id="canvas" width="480" height="320"
+ style="background-color: black;"></canvas>
+ <script src="basics.js"></script>
+</body>
+</html>
@@ -0,0 +1,5 @@
+var canvas = document.getElementById('canvas');
+var ctx = canvas.getContext('2d');
+
+ctx.fillStyle = 'blue';
+ctx.fillRect(40, 60, 150, 100);
@@ -0,0 +1,2 @@
+Validate HTML <http://validator.w3.org/>.
+Dive into HTML5 canvas <http://diveintohtml5.info/canvas.html>.

0 comments on commit b4e9708

Please sign in to comment.