Key Up (Branch 4570)
✨ นายสรรค์ธกรณ์ วงศ์ศิริภา
<html> <head> <title>Let's Start </title> <style> :root{ --h:0; --l:50; } body{ background:hsl(var(--h), 100%, calc(1%*var(--l))); } </style> </head> <body> <script type="text/javascript"> var l = 50; document.body.onkeyup = function(e){ console.log(e); switch(e.key){ case "ArrowUp": document.documentElement.style.setProperty("--l", (l+=10)); } } </script> </body> </html>