<canvas id="GOCanvas" style="width:640px; height:480px; border:1px solid green;"></canvas> <script type="text/javascript"> var canvas = document.getElementById("GOCanvas"); var context = canvas.getContext("2d"); context.fillStyle = "#999999"; context.fillRect(0, 0, 300, 150); </script>
为啥宽300,高150,在不管多高多宽的canvas里的都是正好填满呢,求解释.