-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
61 lines (39 loc) · 1.52 KB
/
test.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!DOCTYPE html>
<html>
<head>
<title>page test</title>
<meta charset="utf-8">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta name="description" content="Test page">
<meta property="og:description" content="Test page">
<meta name="author" content="Benoit">
<meta property="og:title" content="page test">
<meta property="twitter:title" content="page test">
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div id="main" role="main" class="container">
<h1>page test</h1>
<div class="entry">
<canvas width="960" height="665"></canvas>
<script type="text/javascript">
const canvas = document.querySelector('canvas');
const ctx = canvas.getContext('2d');
const width = canvas.width = document.getElementById("main").clientWidth;
const height = canvas.height = window.innerHeight;
ctx.moveTo(0, 0);
ctx.lineTo(width, height);
ctx.stroke();
function reset() {
}
</script>
<button type="button" onclick="reset()">Reset</button>
</div>
</div>
</body>
</html>