Skip to content

Instantly share code, notes, and snippets.

@garciamax
Created July 13, 2021 18:39
Show Gist options
  • Save garciamax/dc95ebd2a318daa877c7410a80cc4781 to your computer and use it in GitHub Desktop.
Save garciamax/dc95ebd2a318daa877c7410a80cc4781 to your computer and use it in GitHub Desktop.
canvas example
<style>
#myCanvas{
width: 100%;
height: 100%;
}
</style>
<canvas id="myCanvas"></canvas>
<script>
var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
ctx.moveTo(0, 0);
ctx.lineTo(200, 100);
ctx.stroke();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment