1、canvas是什么?
画布、用于绘制图像
代码如下
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>你画我猜</title>
<link rel="stylesheet" type="text/css" href="css/style.css"/>
</head>
<body>
<div class="canvas">
<canvas width="800px" height="500px"></canvas>
</div>
<div class="btn-box">
<button class="brush" data-style="brush">画笔</button>
<button class="linear" data-style="linear">直线</button>
<button class="rect" data-style="rect">矩形</button>
<button class="arc" data-style="arc">圆心</button>
<button class="clear" data-style="clear">清屏</button>
<button class="erase" data-style="erase">橡皮檫</button>
<button class="retrue" data-style="retrue">撤销</button><br /><br />
<