inside out project STEP-702 to STEP-703 app.js Code Changes

Created Diff never expires
0 removals
12 lines
9 additions
21 lines
window.onload = function () {
window.onload = function () {
for (i = 0; i < 36; i++) {
for (i = 0; i < 36; i++) {
let v = Math.floor(Math.random() * (150 - 0)) + 0;
let v = Math.floor(Math.random() * (150 - 0)) + 0;
let y = Math.floor(Math.random() * (window.innerWidth - 0)) + 100;
let y = Math.floor(Math.random() * (window.innerWidth - 0)) + 100;
let itm = document.getElementById("tree");
let itm = document.getElementById("tree");
let cln = itm.cloneNode(true);
let cln = itm.cloneNode(true);
cln.style.bottom = v + 'px';
cln.style.bottom = v + 'px';
cln.style.left = (y) + 'px';
cln.style.left = (y) + 'px';
cln.style.zIndex = -1;
cln.style.zIndex = -1;
document.body.appendChild(cln);
document.body.appendChild(cln);
}
}
for (i = 0; i < 3; i++) {
let v = Math.floor(Math.random() * (350 - 100)) + 0;
let y = Math.floor(Math.random() * (window.innerWidth - 0)) + 100;
let itm = document.getElementById("mountain");
let cln = itm.cloneNode(true);
cln.style.left = (y) + 'px';
cln.style.zIndex = -122;
document.body.appendChild(cln);
}
}
}