Last active
November 16, 2020 23:53
-
-
Save codingedgar/8faaf3821e809138e6407c37eb4d14c3 to your computer and use it in GitHub Desktop.
example2 draw line
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> | |
| <body> | |
| <canvas id="myCanvas" width="200" height="100" style="border:1px solid #d3d3d3;"> | |
| Your browser does not support the HTML canvas tag. | |
| </canvas> | |
| <script> | |
| var c = document.getElementById("myCanvas"); | |
| var ctx = c.getContext("2d"); | |
| ctx.moveTo(0, 0); | |
| ctx.lineTo(200, 100); | |
| ctx.stroke(); | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment