-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfillRect.html
More file actions
23 lines (23 loc) · 775 Bytes
/
Copy pathfillRect.html
File metadata and controls
23 lines (23 loc) · 775 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>First page using HTML5 canvas</title>
<script type="text/javascript" src="js/jquery-2.0.3.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var canvas = document.getElementById("myCanvas");
var ctx = canvas.getContext("2d");
ctx.fillStyle = "#000000";
ctx.fillRect(0, 0, 500, 500);
});
</script>
<head>
<body>
<div style="position: absolute; top: 50px; left: 50px;">
<canvas id="myCanvas" width="500" height="500">
Your browser does not support HTML5 canvas element.
</canvas>
</div>
</body>
</html>