blob: 805b6a156bed6ee75eb66729fcfbfc2b2a65f50b [file] [log] [blame]
<html>
<head>
<style>
div {
width:600px;
height:500px;
border:2px solid black;
content: -webkit-canvas(squares);
}
</style>
<script type="application/x-javascript">
function draw(w, h)
{
var ctx = document.getCSSCanvasContext("2d", "squares", w, h);
ctx.fillStyle = "rgb(200,0,0)";
ctx.fillRect (10, 10, 100, 100);
ctx.fillStyle = "rgba(0, 0, 200, 0.5)";
ctx.fillRect (50, 50, 100, 100);
}
</script>
</head>
<body onload="draw(300, 300)">
<div></div>
</body>
</html>