Blog

Shadow Color Attribute of Canvas in HTML5

By Mahak Gupta Blogs | HTML 5 Mar 11, 2012
This attribute specifies the color of the shadow.
Download Files: Shadow Color Attribu
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.

<canvas id="myfirstCanvas" width="250" height="150" style="border:1px solid;#d3d3d3;">
 </canvas>

<script type="text/javascript">

var mycanvas=document.getElementById("myfirstCanvas");
var x=mycanvas.getContext("2d");
x.rect(20,30,40,50);
x.fillStyle="pink";
x.shadowColor="black";
x.shadowBlur=20;
x.fill();

</script>

</body>
</html>

1.png



COMMENT USING

PREMIUM SPONSORS

Hire Mobile & Web Developer on demand. 100% satisfaction. Try for 1 week or Money Back. Local and remote developers available all over USA.

Latest Blogs