Skip to content

Instantly share code, notes, and snippets.

@theimpostor
Created October 30, 2022 15:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save theimpostor/da9dc8ce5247e6ba774161915871a4e9 to your computer and use it in GitHub Desktop.
Save theimpostor/da9dc8ce5247e6ba774161915871a4e9 to your computer and use it in GitHub Desktop.
WNyQZNR
<canvas id="canvas" width=500 height=400></canvas>
const c = document.getElementById("canvas").getContext("2d");
c.fillStyle = "black";
c.strokeRect(0, 0, 500, 400);
c.fillStyle = "blue";
c.fillRect(10, 10, 480, 380);
c.fillStyle = "orange";
c.font = "small-caps bold 24px sans-serif";
c.textAlign = "center";
c.fillText("Hello code hackerz!", 250, 200);
body {
display: grid;
place-content: center;
background: rgb(0, 0, 0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment