I\'m not sure if my title coherently expressed my issue, but I\'ll explain below.
I would like to assign a different color to each character in a st
Dumb CSS only solution - where you need to put each letter into separate so you can use
:nth-child(2n+1)
.username span {
color: red;
}
.username span:nth-child(2n+1) {
color: blue;
}
Username
OR
you can use small JavaScript like Ryan Rodemoyer suggested in this answer:
var message = "The quick brown fox.";
var colors = new Array("#ff0000","#00ff00","#0000ff"); // red, green, blue
for (var i = 0; i < message.length; i++)
document.write("" + message[i] + "");
OR
maybe you're looking for something like this