From 0323a71997a2a7cbb4f2dc310ca0f1424c01a0c1 Mon Sep 17 00:00:00 2001 From: SrIzan10 Date: Sun, 4 Apr 2021 16:07:32 +0200 Subject: [PATCH] 2 --- index.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index f6cddf8..f239c91 100755 --- a/index.html +++ b/index.html @@ -31,12 +31,13 @@ console.log(x); var element = document.getElementsByClassName('home-intro'); document.getElementById("homeintro").style.height="1000px"; - //document.getElementById("homeintro").style.backgroundImage = - //"url("+images[x] +")"; - // } + document.getElementById("homeintro").style.backgroundImage = + "url("+images[x] +")"; + } console.log(element); element[0].style["background-image"] = "url("+ images[x] + ") no-repeat;"; } + document.addEventListener("DOMContentLoaded", randomImage);