Keyframe
Make the logo rotate continuously. AI says to use keyframes?
Make the logo rotate continuously. AI says to use keyframes?
@keyframes spin {
0% { rotate: 0deg }
50% { rotate: 180deg }
100% { rotate: 360deg }
}
.spin { animation: spin 2s infinite }Bolded percentages are the state points you specify; unwritten positions are filled in automatically.
A transition has only two states: From initial to target state, triggered by hover or click; it plays once and stops.
Keyframes can have many states and loop: Specify multiple state points at 0%, 50%, 100% and set infinite looping or a repeat count.
Read the code for state points: The percentages inside @keyframes are the author's specified state points; unspecified positions are filled in by the system.
Make the loading icon rotate in an infinite loop: use @keyframes to specify the 0% to 100% rotation states and set infinite looping. Afterward, confirm it keeps rotating in the page and stops when the system's reduce motion setting is on.