Canvas第七章阴影

    科技2022-07-10  197

    第七章 阴影

    <canvas height="500" width="500" id="canvas"></canvas> <script> var elem=document.getElementById("canvas"); var canvas=elem.getContext("2d"); canvas.shadowColor="#FFCE44"; canvas.shadowOffsetX=10; canvas.shadowOffsetY=10; canvas.shadowBlur=15; canvas.beginPath(); canvas.arc(200,200,100,0,2*Math.PI,true); //canvas.rect(100,100,200,200); canvas.closePath(); canvas.fillStyle="#FFE900"; canvas.fill(); </script>
    Processed: 0.025, SQL: 8