<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=400">
<title> canvas手写毛笔字效果 </title>
<style type="text/css">
body {
margin: 0;
padding: 0;
background-color: #999999;
}
h1 {
text-align: center;
}
#canvasId {
background-color: #FFFFcc;
}
.button {
width: 100px;
height: 40px;
}
</style>
</head>
<body>
<h1>手写毛笔字效果-手机版</h1>
<canvas id="canvasId" width="400" height="400"></canvas><br />
<input type="button" value="全部清除" class="button" onclick="hw.clear();" />
<input type="button" value="清除最后一笔" class="button" onclick="hw.historyBack();" />
<script type="text/javascript">
function Handwriting(id) {
this.canvas = document.getElementById(id);
this.ctx = this.canvas.getContext("2d");
this.ctx.fillStyle = "rgba(0
手写毛笔字效果-手机版
最新推荐文章于 2025-06-04 16:52:28 发布