blob: 77745ae5f5874480692b4b60f6f573ed76cb3108 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p><canvas width="500" height="200" id="c"></canvas></p>
<script type="text/javascript">
const t = '你好Hello';
var c = document.getElementById('c').getContext('2d');
c.font = 'serif';
c.fontSize = '15';
c.fillText(t, 10, 100);
</script>
</body>
</html>
|