Text color with fading over time effect
问题 Is there any way i can do fading/decay color effect on html text by javascript or css? right now i read from database and append the text to a div, the text initially would be blue color and it will decay to black color over certain amount of time (like 5 secs). right now i just appending text to div with $('#txtBox1').append("#"+ data.message[i]+ "</br>"); 回答1: Can be easily done with CSS animations. Here's an example. jsFiddle Demo .fading { -webkit-animation-duration: 1s; -webkit-animation