- Use this template https://github.com/greggman/better-unity-webgl-template
- Modify Assets\WebGLTemplates\Better2020\TemplateData\style.css
- Use this code for body:
body {
margin: 0;
background: #000000;
aspect-ratio: 16 / 9;
margin-left: auto;
margin-right: auto;
}