Last active
March 6, 2022 10:17
-
-
Save modster/ca8e16a4d9d78dd3b20cd1d47a346f07 to your computer and use it in GitHub Desktop.
canvas
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Canvas tutorial</title> | |
<script> | |
function draw() { | |
var canvas = document.getElementById('tutorial'); | |
if (canvas.getContext) { | |
var ctx = canvas.getContext('2d'); | |
} | |
} | |
</script> | |
<style> | |
canvas { border: 1px solid black; } | |
</style> | |
</head> | |
<body onload="draw();"> | |
<canvas id="tutorial" width="150" height="150"></canvas> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment