Como alterar a cor do texto após X quantidade de segundos?
este é o meu código:
<font color=green>
14:00
</font><br>
<font color=green>
14:30
</font><br>
<font color=green>
15:00
</font><br>
........
Como posso alterar a cor (em vermelho) de todos os textos depois de algum tempo?
Eu tentei esse código, mas obviamente ele não funciona (onLoad
é apenas para as tags body / img):
<font color=green onLoad="setTimeout('this.style.color=red',xxx-seconds);">
14:00
</font><br>
Alguma sugestão?
Solução adotada (graças ao minitech):
<style>
@keyframes change {
from { color: green }
to { color: red }
}
</style>
<span style='animation: change (number-of-seconds)s step-end both;'>
14:30
</span>
<span style='animation: change (number-of-seconds)s step-end both;'>
15:00
</span>
.............