Code
Execute
<!DOCTYPE html> <html> <head> <title>wikitechy shadowoffsety propertey in canvas</title> </head> <body> <h1>wikitechy shadowoffsety property in canvas</h1> <canvas id="wikitechyCanvas" width="300" height="150" style="border:1px solid #d3d3d3;"> </canvas> <script> var c = document.getElementById("wikitechyCanvas"); var context = c.getContext("2d"); context.shadowBlur = 10; context.shadowOffsetY = 20; context.shadowColor = "red"; context.fillStyle= "blue"; context.fillRect(30, 30, 120, 100); </script> </body> </html>
Result