Skip to content

Instantly share code, notes, and snippets.

@modeverv
Last active October 10, 2018 06:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save modeverv/375acd2463c5062ced623197a140f658 to your computer and use it in GitHub Desktop.
Save modeverv/375acd2463c5062ced623197a140f658 to your computer and use it in GitHub Desktop.
画面がキラキラするやつ
<!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>Document</title>
</head>
<body>
</body>
<script>
es = document.getElementsByTagName("body");
c = 0x000000;
setInterval(() => {
es[0].style.backgroundColor = pad6(c);
c++;
if (c > 0xFFFFFF) {
c = 0x000000;
}
}, 20);
var pad6 = function (num) {
const a = '#' + ('000000' + num).slice(-6);
console.log(a);
return a;
}
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment