padrão Fellyph.Cint.. Follow 2011-11-11 02:31:02 License: MIT License Fork0 Fav0 View1332 Play Stop Reload Fullscreen Smart Phone Readme JavaScript 16 lines HTML 7 lines CSS 1 lines padrão function init(){ var ctx = document.getElementById('meucanvas').getContext('2d'); for(i = 0 ; i < 4; i++ ){ for(j = 0; j < 4; j++ ){ var posx = j * 100 var posy = i * 100 ctx.fillStyle = 'rgb(230,0,0)' ; ctx.fillRect(posx,posy,100,100); ctx.clearRect(posx + 10, posy + 10,80,80); ctx.strokeRect(posx + 25,posy + 25,50,50); } } } <html> <head> </head> <body onload="init()"> <canvas id="meucanvas" width="400" height="400"> </canvas> </body> </html> padrão body { background-color: #DDDDDD; font: 30px sans-serif; } function init(){ var ctx = document.getElementById('meucanvas').getContext('2d'); for(i = 0 ; i < 4; i++ ){ for(j = 0; j < 4; j++ ){ var posx = j * 100 var posy = i * 100 ctx.fillStyle = 'rgb(230,0,0)' ; ctx.fillRect(posx,posy,100,100); ctx.clearRect(posx + 10, posy + 10,80,80); ctx.strokeRect(posx + 25,posy + 25,50,50); } } } <html> <head> </head> <body onload="init()"> <canvas id="meucanvas" width="400" height="400"> </canvas> </body> </html> body { background-color: #DDDDDD; font: 30px sans-serif; } use an iframe compat browser, deer Play on jsdo.it games Share Embed QR Tag Download Complete! Description どんなゲームですか? Control Device スマートフォンコントローラー jsdo.it WebSocket Controller» マウス キーボード タッチデバイス Fullscreen 有効 無効 jsdo.it games から削除する Submit Tweet style Design view Code view code <script type="text/javascript" src="http://jsdo.it/blogparts/ckrp/js?view=design"></script><p class="ttlBpJsdoit" style="width: 465px; margin: 0; text-align: right; font-size: 11px;"><a href="http://jsdo.it/Fellyph.Cintra/ckrp" title="padrão">padrão - jsdo.it - share JavaScript, HTML5 and CSS</a></p> Tweet twitter