YouTip LogoYouTip

Prop Canvas Shadowblur

# HTML canvas shadowBlur Property [![Image 8: Canvas Object Reference](#) Canvas Object](#) ## Example Draw a red rectangle with a black shadow, blur level is 20: YourbrowserdoesnotsupporttheHTML5canvastag. JavaScript: var c=document.getElementById("myCanvas"); var ctx=c.getContext("2d"); ctx.shadowBlur=20; ctx.shadowColor="black"; ctx.fillStyle="red"; ctx.fillRect(20,20,100,80); [Try it Β»](#) * * * ## Browser Support ![Image 9: Internet Explorer](#)![Image 10: Firefox](#)![Image 11: Opera](#)![Image 12: Google Chrome](#)![Image 13: Safari](#) The shadowBlur property is supported in Internet Explorer 9, Firefox, Opera, Chrome, and Safari. **Note:** Internet Explorer 8 and earlier versions do not support the element. * * * ## Definition and Usage The shadowBlur property sets or returns the blur level of the shadow. | Default value: | 0 | | --- | | JavaScript syntax: | _context_.shadowBlur=_number_; | ## Property Values | Value | Description | | --- | --- | | _number_ | The blur level of the shadow | * * Canvas Object](#)
← Prop Canvas ShadowoffsetxProp Canvas Shadowcolor β†’