background color random

This commit is contained in:
2025-10-24 17:24:12 +02:00
parent d675b15f96
commit 50adda91c9

View File

@@ -81,6 +81,10 @@ console.log('document', document);
let body = document.getElementById('body'); let body = document.getElementById('body');
console.log('body', 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'); let balle = document.createElement('div');
balle.classList.add('balle'); balle.classList.add('balle');