代码
提交代码
<canvas id="test" width="200" height="200">您的浏览器不支持canvas</canvas> <script> var canvas_2=document.getElementById("test"); var can2_context=canvas_2.getContext("2d"); var SHADOW_COLOR='rgba(0,0,0,0.7)' can2_context.shadowColor=SHADOW_COLOR; can2_context.shadowOffsetX=3; can2_context.shadowOffsetY=3; can2_context.shadowBlur=5 can2_context.fillStyle="red" can2_context.fillRect(0,0,100,100) </script>
运行结果