cheat/dev

steps()

Anima em degraus discretos em vez de suave, como quadros de sprite.

Sintaxe

animation-timing-function: steps(8, end);

steps(n) divide a animação em n saltos. Usado em efeito de máquina de escrever, relógios, sprites de personagem e spinners em 'tique-taque'.

Exemplo

.digitando {
  width: 20ch;
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid;
  animation: digitar 3s steps(20) forwards;
}
@keyframes digitar {
  from { width: 0; }
  to   { width: 20ch; }
}