HTML and CSS Reference
In-Depth Information
context.rect(50,340,300,50);
context.fill();
context.stroke();
context.lineWidth = 2;
context.font = '40px sans-serif';
context.strokeStyle = "black";
context.fillStyle = "white";
context.fillText("Canvas is great!",60,375);
context.shadowOffsetX = 10;
context.shadowOffsetY = 5;
context.shadowColor = "rgba(0,48,48,0.5)";
context.shadowBlur = 5;
context.strokeText("Canvas is great!",60,375);
}
}
</script>
</head>
<body>
<canvas id="canvas" width="400" height="400">
<strong> Canvas Supporting Browser Required </strong>
</canvas>
</body>
</html>
F IGURE 2-6 Even dogs love <canvas>.
Search WWH ::




Custom Search