Using the animation shorthand

The table provides the equivalence of the shorthand declaration: animation: KF-rainbow 3s ease-in 1s infinite reverse both running.

animation-name KF-rainbow
animation-duration 3s
animation-timing-function ease-in
animation-delay 1s
animation-iteration-count infinite
animation-direction reverse
animation-fill-mode both
animation-play-state running
animation-timeline

Specifying the @keyframes

Set of percentage => declarations mapping, where the percentage is (current/total) of running time of the animation, declarations get interpolated between keyframes.