Invert parallax and keep background aspect

This commit is contained in:
2026-02-03 01:17:57 +01:00
parent bb810584ee
commit 64f5b76362
2 changed files with 18 additions and 7 deletions

View File

@@ -8,7 +8,7 @@
sans-serif;
background: #f6e9d6;
color: #2c1c0d;
--bg-scale: 115%;
--bg-scale: 1.12;
--bg-x: 0px;
--bg-y: 0px;
}
@@ -28,11 +28,21 @@
gap: 16px;
min-height: 100vh;
background-color: #f6e9d6;
position: relative;
overflow: hidden;
}
.page::before {
content: "";
position: fixed;
inset: 0;
background-image: url("background.png");
background-repeat: no-repeat;
background-attachment: fixed;
background-size: var(--bg-scale) var(--bg-scale);
background-size: cover;
background-position: calc(50% + var(--bg-x)) calc(50% + var(--bg-y));
transform: scale(var(--bg-scale));
transform-origin: center;
z-index: -1;
will-change: transform, background-position;
}
.lang-field {