600045-1.html (363B)
1 <!DOCTYPE HTML> 2 <canvas width="100" height="100" id="c" style="background: #f00"></canvas> 3 <script> 4 window.onload = function () { 5 var ctx = document.getElementById('c').getContext('2d'); 6 7 ctx.globalCompositeOperation = 'lighter'; 8 ctx.scale(5, 5); 9 ctx.strokeStyle = '#0f0'; 10 ctx.lineWidth = 10; 11 ctx.strokeRect(5, 5, 10, 10); 12 } 13 </script>