OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
3 <style> | |
4 div { | |
5 width:600px; | |
6 height:500px; | |
7 border:2px solid black; | |
8 content: -webkit-canvas(squares); | |
9 } | |
10 </style> | |
11 | |
12 <script type="application/x-javascript"> | |
13 function draw(w, h) | |
14 { | |
15 var ctx = document.getCSSCanvasContext("2d", "squares", w, h); | |
16 | |
17 ctx.fillStyle = "rgb(200,0,0)"; | |
18 ctx.fillRect (10, 10, 100, 100); | |
19 | |
20 ctx.fillStyle = "rgba(0, 0, 200, 0.5)"; | |
21 ctx.fillRect (50, 50, 100, 100); | |
22 } | |
23 </script> | |
24 </head> | |
25 <body onload="draw(300, 300)"> | |
26 <div></div> | |
27 </body> | |
28 </html> | |
OLD | NEW |