jweinst1
4/13/2016 - 5:21 PM

playing around with html canvas in html

playing around with html canvas in html

<!DOCTYPE html>
<html>
<body>

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

<script>
var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
ctx.fillStyle = "#FF0000";
ctx.fillRect(0,0,150,75);
ctx.fillStyle = "#cc33ff"
ctx.fillRect(0,0,5,5)
ctx.fillRect(5,5,5,5)
ctx.fillRect(10,10,5,5)
</script>

</body>
</html>