Changed up image sizing
This commit is contained in:
parent
6f222a917c
commit
93985054f7
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue