ぼかしレベルが 20 である黒い影付きの赤い矩形を描画します:
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 Yourself »
表中の数字は、プロパティを完全にサポートした最初のブラウザ・バージョンを指定しています。
Property | |||||
---|---|---|---|---|---|
shadowBlur | Yes | 9.0 | Yes | Yes | Yes |
shadowBlur プロパティは、影のぼかしレベルを設定または返します。
デフォルト値: | 0 |
---|---|
JavaScript 構文: | context.shadowBlur=number; |
値 | 説明 | Play it |
---|---|---|
number | 影のぼかしレベル | Play it » |