scriptrm/canvas1.html

41 lines
934 B
HTML
Raw Permalink Normal View History

2020-11-16 14:31:45 +00:00
<!DOCTYPE html>
<html>
<head>
<title>Canvas 1</title>
<meta charset="utf-8">
<meta name="description"
content="THIS IS A TEMPLATE FOR SINGLE-PAGE APP FILES.">
<!-- [STYLE] ======================================================= -->
<style>
body {
color: #009000 ;
background-color: black ;
font-family: "Bitstream Vera Sans Mono", "Lucida Sans",
"Lucida Console", "MS Gothic" ;
}
canvas { border:1px solid #009000; }
</style>
</head>
<body>
<!-- [CONTENT] ===================================================== -->
<h1>Canvas 1</h1>
<canvas id="canvas1" width="600" height="600"></canvas>
<!-- [SCRIPT] ====================================================== -->
<script>
var canvas = document.getElementById("canvas1");
var ctx = canvas.getContext("2d");
ctx.fillStyle = "#909090";
ctx.fillRect(10, 10, 580, 580);
</script>
</body>
</html>