Animations with Keyframes

suggest change

@keyframes defines intermediate states for a CSS animation:

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.06);
  }
}

.status-indicator {
  animation: pulse 1.2s ease-in-out infinite;
}

The animation shorthand above supplies the name, duration, timing function, and iteration count. Other useful longhands include animation-delay, animation-direction, animation-fill-mode, and animation-play-state.

Use the unprefixed @keyframes and animation syntax. Provide a reduced-motion alternative for nonessential movement:

@media (prefers-reduced-motion: reduce) {
  .status-indicator {
    animation: none;
  }
}

Animations should not be the only way important state changes are communicated.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents