Exercise 7 (Branch 4150) เสร็จแล้ว
✨ Naiohm Pwpp
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="X-UA-Compatible" content="ie=edge" /> <title>Jabont.com</title> <style> :root { --s: 0%; --h: 200; } .xexe { background: hsl(var(--h), var(--s), 50%); } </style> </head> <body id="aaa"> <h1 id="xyz">Hello World</h1> <h2 id="abc"></h2> <div id="wrap1"></div> <script> for (let i = 0; i <= 10; i++) { wrap1.innerHTML += `<div class="xexe" style="--s:${ i * 10 }%">${i}</div>`; } </script> <input type="range" min="0" max="360" step="10" id="myrange" onclick="document.documentElement.style.setProperty('--h', this.value); abc.innerHTML = this.value;" /> </body> </html>