Update CSS for index.html to improve layout and positioning of elements

This commit is contained in:
2025-05-28 04:25:45 +02:00
parent 46f100c268
commit cfa79872c5

View File

@@ -16,29 +16,25 @@
html, body { html, body {
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
margin: 0; padding: 0; margin: 0;
padding: 0;
overflow: hidden; overflow: hidden;
background: #000; background: #000;
} }
#viewer { #viewer {
position: fixed; /* fills window, always on top */ position: fixed;
inset: 0; inset: 0;
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
background: #000;
overflow: hidden; overflow: hidden;
display: flex; background: #000;
justify-content: center;
align-items: center;
z-index: 1;
} }
canvas { canvas {
display: block; display: block;
width: 100vw; /* so that Three.js resizing works right */ position: absolute;
height: 100vh; left: 50%; top: 50%;
max-width: none; transform: translate(-50%, -50%);
max-height: none; /* width/height wird durch JS gesetzt */
pointer-events: auto;
} }
/* Optional: Overlay z-index */ /* Optional: Overlay z-index */
#spirit-info { #spirit-info {