これは私のコードです:
<font color=green>
14:00
</font><br>
<font color=green>
14:30
</font><br>
<font color=green>
15:00
</font><br>
........
しばらくしてからすべてのテキストの色 (赤) を変更するにはどうすればよいですか?
私はこのコードを試しましたが、明らかに機能しません( onLoad
body/imgタグのみです):
<font color=green onLoad="setTimeout('this.style.color=red',xxx-seconds);">
14:00
</font><br>
助言がありますか?
採用されたソリューション (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>
.............