animation-duration
Sets how long one animation cycle takes. The default is 0s which means no animation plays. Always set a duration when using animation-name.
Sets how long one animation cycle takes. The default is 0s which means no animation plays. Always set a duration when using animation-name.
@keyframes slide {
from { transform: translateX(-100%); }
to { transform: translateX(0); }
}
.fast { animation-name: slide; animation-duration: 0.2s; }
.normal{ animation-name: slide; animation-duration: 0.5s; }
.slow { animation-name: slide; animation-duration: 1.5s; }
UI micro-animations work best between 100–400ms; decorative animations can be longer.