Source code
Revision control
Copy as Markdown
Other Tools
<!DOCTYPE html>
<html>
<body>
<canvas id="canvas" width="100" height="100"></canvas>
<script>
var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d');
ctx.fillStyle = '#0f0';
ctx.shadowOffsetX = 10;
ctx.shadowColor = '#ccc';
ctx.fillRect(20, 25, 50, 40);
ctx.fillStyle = '#000';
ctx.fillRect(20, 65, 50, 10);
</script>
</body>
</html>