้เสร็จไอ้สาสสส
✨ นายสรรค์ธกรณ์ วงศ์ศิริภา
<html> <head> <title>Let's Start </title> <style> :root{ --h: 0; --l: 50; } body{ background:hsl(var(--h), 100%, calc(1% * var(--l))); height:3600vh; } h1{ position:fixed; color:white; } </style> </head> <body> <h1> window.scrollY = <span id="val"> </span> </h1> <script type="text/javascript"> window.onscroll = function(){ let scrollY = window.scrollY; val.innerText = scrollY; scrollY = scrollY*0.01; document.documentElement.style.setProperty("--h", (h=scrollY)); } </script> </body> </html>