青墨
2015-03-25 20:42
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>文字渲染</title>
<script type="text/javascript">
window.onload=function()
{
var canvas=document.getElementById("canvas");
canvas.width=800;
canvas.height=800;
var context=canvas.getContext("2d");
//绘制阴影
context.fillStyle="#058";
context.ShadowColor="gray";
context.shadowOffsetX=20;
context.shadowOffsetY=20;
context.shadowBlur=5;
context.fillRect(100,500,300,300);
}
</script>
</head>
<body>
<canvas id="canvas" style="border:1px solid #aaa;display:block;margin:50px auto;"></canvas>
</body>
</html>
亲,context.ShadowColor="gray"; 这句里面ShadowColory的s应该是小写 ==> shadowColor
Canvas绘图详解
72881 学习 · 422 问题
相似问题