menu_book Course Curriculum (HTML Canvas) expand_more
Canvas Setup
Paths & Shapes
Styling
Text & Images
Transforms
Compositing & Clipping
Pixels & Animation
Shadow offsets
Learn Shadow offsets in HTML Canvas with a focused explanation, a topic-specific example, edge guidance, and a mastery check.
12 min read
•
Intermediate
canvas-060.js
js
const canvas=document.querySelector("canvas");
const ctx=canvas.getContext("2d");
ctx.shadowColor="black";ctx.shadowOffsetX=8;ctx.shadowOffsetY=6;ctx.fillRect(30,25,120,70);
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content