From 50adda91c9bfe5ec8c3f2047ebc2b8380ed52a03 Mon Sep 17 00:00:00 2001 From: bach Date: Fri, 24 Oct 2025 17:24:12 +0200 Subject: [PATCH] background color random --- bases-js/script.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bases-js/script.js b/bases-js/script.js index 4775147..9aa5304 100644 --- a/bases-js/script.js +++ b/bases-js/script.js @@ -81,6 +81,10 @@ console.log('document', document); let body = document.getElementById('body'); console.log('body', body); +let h = Math.random()*360; +let s = Math.random()*100; +let l = Math.random()*100; +body.style.backgroundColor = `hsl(${h} ${s} ${l})`; let balle = document.createElement('div'); balle.classList.add('balle');