this is my code:
<font color=green>
14:00
</font><br>
<font color=green>
14:30
</font><br>
<font color=green>
15:00
</font><br>
........
How can I change color (in red) of every single text after some time has passed?
I have tried this code but obviously it doesn't function (onLoad
is only for the body/img tags):
<font color=green onLoad="setTimeout('this.style.color=red',xxx-seconds);">
14:00
</font><br>
Any suggestions?
Solution adopted (thanks to 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>
.............
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…