A Pen by theimpostor on CodePen.
Created
October 30, 2022 15:33
-
-
Save theimpostor/da9dc8ce5247e6ba774161915871a4e9 to your computer and use it in GitHub Desktop.
WNyQZNR
This file contains 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
<canvas id="canvas" width=500 height=400></canvas> |
This file contains 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
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); |
This file contains 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
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