You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
379 B
JavaScript
17 lines
379 B
JavaScript
const container = document.getElementById("container");
|
|
// console.log(container.children);
|
|
|
|
let images = Array.from(container.children);
|
|
// console.log(images);
|
|
|
|
// for (index in images) {
|
|
// console.log(images[index]);
|
|
// }
|
|
|
|
images.forEach((image) => {
|
|
left = Math.random() * 100;
|
|
top = Math.random() * 100;
|
|
image.style.left = left + "%";
|
|
image.style.top = top + "%";
|
|
});
|