<style>
@keyframes anim {
from { color: red }
}
input {
animation: anim 1s;
</style>
<script>
input=document.createElement('input');
document.documentElement.appendChild(input);
</script>