5 background: -webkit-canvas(squares);
6 width:
200px; height:
200px;
7 border:
2px solid black;
12 <script type=
"application/x-javascript">
14 var ctx = document.getCSSCanvasContext(
"2d",
"squares", w, h);
16 ctx.fillStyle =
"rgb(200,0,0)";
17 ctx.fillRect (
10,
10,
55,
50);
19 ctx.fillStyle =
"rgba(0, 0, 200, 0.5)";
20 ctx.fillRect (
30,
30,
55,
50);
24 <body onload=
"draw(150, 150)">
26 <div style=
"zoom: 1.5"></div>