HTML5之Canvas探秘1:创建Canvas
Cavas画布
1 <canvas id="canvas" width="500px" height="500px"></canvas>
首先建立画布
1 var canvas = document.getElementById('canvas');
然后拿起你的画笔
var context = canvas.getContext('2d');
紧接着你就可以发挥你的想象力去描绘啦!
Cavas画布
1 <canvas id="canvas" width="500px" height="500px"></canvas>
首先建立画布
1 var canvas = document.getElementById('canvas');
然后拿起你的画笔
var context = canvas.getContext('2d');
紧接着你就可以发挥你的想象力去描绘啦!