Skip to content

Instantly share code, notes, and snippets.

@lee2sman
Created April 17, 2023 04:51
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 lee2sman/5fd5c06f50e0f6621d7db1f882d42ce1 to your computer and use it in GitHub Desktop.
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
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