Skip to content

Instantly share code, notes, and snippets.

@brunurd
Last active April 3, 2019 12:54
Show Gist options
  • Save brunurd/8f16cf6b560f21264d6af6fde09ea6ce to your computer and use it in GitHub Desktop.
Save brunurd/8f16cf6b560f21264d6af6fde09ea6ce to your computer and use it in GitHub Desktop.
Unity WebGL full window
<!--
Before add this to the your "index.html" file:
- Remove any style="..." attribute.
- Remove any <style> tag.
- Remove any <link rel="stylesheet"...> tag.
-->
<style>
html, body, canvas, #canvas, #gameContainer, .webgl-content {
width: 100% !important;
height: 100% !important;
padding: 0 !important;
margin: 0 !important;
overflow: hidden;
}
#gameContainer {
margin: 0 auto !important;
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment