blob: ce1e13fb461a63a9bdde2b4b52e57fbd08449e43 [file] [log] [blame]
<!DOCTYPE html>
<html>
<style>
html, body { margin: 0; padding: 0; }
</style>
<body>
<canvas id ="canvas" width="400" height="400" style="position:relative;"></canvas>
<script>
var canvas = document.getElementById('canvas');
var context = canvas.getContext("2d");
context.shadowBlur = 40;
context.shadowColor = 'red';
context.shadowOffsetX = 60;
context.shadowOffsetY = 80;
context.fillRect(40, 40, 100, 100);
</script>
</body>
</html>