Permalink
Browse files

the other way

  • Loading branch information...
1 parent 7f5747a commit 09768f3a187e28de9c936f0e84ca3b874c22a70d @nadu committed Apr 5, 2012
Showing with 39 additions and 1 deletion.
  1. +2 −1 README
  2. +37 −0 canvas.html
View
3 README
@@ -1 +1,2 @@
-This is the README for my labs project. Lets try once more
+This is the README for my labs project. Lets try once more. Ok so Pull worked.
+Lets try the other way
View
@@ -0,0 +1,37 @@
+<html>
+<head>
+<style>
+canvas {
+ border: 1px solid black;
+}
+#tutorial{
+ left:200px;
+}
+</style>
+
+<script>
+function draw(){
+ var canvas = document.getElementById('tutorial');
+ if(canvas.getContext){
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = "rgb(51,51,51)";
+ ctx.arc(75,75,50,0,Math.PI*2,true); // Outer circle
+ ctx.fill();
+ setTimeout(function(){
+ ctx.arc(110,75,50,0,Math.PI*2,true); // Outer circle
+ ctx.fill();}, 300);
+
+ }
+ else{
+ console.log("canvas unsupported code here");
+ }
+}
+</script>
+</head>
+<body onload='draw();'>
+<canvas id="tutorial" width="1300" height="150">
+This will show up in browsers which do not support Canvas element.
+Can be used like alt tags. Provide some image ideally.
+</canvas>
+</body>
+</html>

0 comments on commit 09768f3

Please sign in to comment.