1、canvas阴影
<style>canvas {width: 500px;height: 300px;border: 1px solid;}</style></head><body><canvas id="can" width="500px" height="300px"></canvas><script>var canvas = document.getElementById("can");var ctx = canvas.getContext("2d");ctx.beginPath();ctx.shadowColor = "black";//阴影颜色ctx.shadowBlur = 30; //阴影大小,阴影是骑在线上的ctx.sahdowOffsetX = 15; //ctx.sahdowOffsetYctx.fillRect(0,0,200,200);</script></body>
