HTML <canvas> 标签
html <canvas> 通过 JavaScript 来绘制图形,比如图表和其他图像
<canvas> 只是图形容器,必须使用脚本来绘制图形
<canvas> 元素中的任何文本将会被在 <canvas> 的浏览器中
范例
通过 <canvas> 元素来红色的矩形
<canvas id="myCanvas"></canvas> <script>var canvas=document.getElementById('myCanvas');var ctx=canvas.getContext('2d'); ctx.fillStyle='#FF0000'; ctx.fillRect(0,80,100); </script>