JSFiddle - React, Tailwind, and code Playground
by sammy
JavaScript
fadeSpan = function(){};
var s = document.createElement('script');
s.src = 'https://github.com/samholmes/Animation.js/raw/master/Animation.min.js';
s.onload = function(){
var anim = new Animation({
frames: [{
step: function(t) {
for(var i=1; i<=8; ++i) {
var el = document.getElementById('sp'+i);
el.style.color = "#"+colors[Math.floor(t*16-i+8)];
}
},
duration: 1000
}],
loop:true
});
colors = new Array("00FF00", "00BB00", "00AA00", "009900", "007700", "006600", "005500", "002200", '005500', '060', '070', '090', '0a0', '0b0');
anim.play();
};
document.body.appendChild(s);