Shadow Color Attribute of Canvas in HTML5

Shadow Color Attribute of Canvas in HTML5 

 
This attribute specifies the color of the shadow. We can define it by the shadowOffsetX, shadowOffsetY, and the shadowBlur property.
 
Here we discuss the shadowBlur Property.
  1. <canvas id="myfirstCanvas" width="250" height="150" style="border:1px solid;#d3d3d3;"></canvas>  
  2. <script type="text/javascript">  
  3. var mycanvas=document.getElementById("myfirstCanvas");  
  4. var x=mycanvas.getContext("2d");  
  5. x.rect(20,30,40,50);  
  6. x.fillStyle="pink";  
  7. x.shadowColor="black";  
  8. x.shadowBlur=20;  
  9. x.fill();  
  10. </script>undefined</body>undefined</html>  
1.png
Next Recommended Reading CANVAS in HTML5 (Best Drawing Surface)