diff --git a/src/main.ts b/src/main.ts index 19eab81..24053d1 100644 --- a/src/main.ts +++ b/src/main.ts @@ -152,6 +152,7 @@ let setImages = () => { const left = lefts[index]; const top = tops[index]; const z = (Math.abs(left) + Math.abs(top)) / 2; + const size = Math.random() * 5 + 9; const range = { x: window.innerWidth * 0.7, y: window.innerHeight * 0.7 }; img.style.setProperty( "left", @@ -159,6 +160,7 @@ let setImages = () => { ); img.style.setProperty("top", `${top * range.y + window.innerHeight / 2}px`); img.style.setProperty("--translate-z", `${z * 3000}px`); + img.style.setProperty("inline-size", `${size}vmax`); background.append(img); } }; diff --git a/style.css b/style.css index c536af9..bbb04dc 100644 --- a/style.css +++ b/style.css @@ -72,9 +72,7 @@ img { transition: opacity 0.3s; opacity: 0; position: absolute; - inline-size: 10%; z-index: -1; - min-inline-size: 10rem; border: 0.01rem solid var(--img-border-color); border-radius: 1rem; box-shadow: 0.05rem 0.05rem 0px var(--img-bg-color),