-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrainbow.js
More file actions
30 lines (27 loc) · 1001 Bytes
/
rainbow.js
File metadata and controls
30 lines (27 loc) · 1001 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
var style = document.createElement("style");
style.innerHTML =
"body {" +
"background:linear-gradient(#9400D3,#0000FF);" +
"animation:0.3s sht4 infinite alternate;" +
"color:white;" +
"}" +
"div {" +
"background:linear-gradient(#00FFFF,#FF00CC);" +
"animation:0.3s sht4 infinite alternate-reverse;" +
"}" +
"a,h1,h2 {" +
"background: linear-gradient(#00FFFF,#FF00CC);" +
"animation:0.5s sht4 infinite" +
"}" +
"p,td {" +
"color:white;" +
"}" +
"@keyframes sht4 {" +
"0% {background:linear-gradient(#9400D3,#0000FF);} " +
"25% {background:linear-gradient(#0000FF,#00FF00);}" +
"50% {background:linear-gradient(#00FF00,#FFFF00);}" +
"75% {background:linear-gradient(#FFFF00,#FF0000);}" +
"100% {background:linear-gradient(#FF0000,#9400D3);}" +
"}"
var ref = document.querySelector("script");
ref.parentNode.insertBefore(style, ref);