Created
April 17, 2023 04:51
-
-
Save lee2sman/5fd5c06f50e0f6621d7db1f882d42ce1 to your computer and use it in GitHub Desktop.
a stylesheet to place a sole canvas element in the center of the page via flexbox
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
html, body { | |
margin: 0; | |
padding: 0; | |
} | |
body { | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
height: 100vh; | |
} | |
canvas { | |
display: block; | |
border: 2px dotted green; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment