Keyframe Animations
@keyframes define steps. animation sets name, duration, timing, delay, count, direction and fill mode. Use animation-fill-mode: forwards to keep the end state.
Example
<style>
@keyframes pulse { 0%,100% { transform: scale(1) } 50% { transform: scale(1.2) } } .p { width: 40px; height: 40px; background: #14b8a6; border-radius: 50%; animation: pulse 1.2s ease-in-out infinite }
</style>
<div class="p"></div>Exercise
Repeat forever.
animation-iteration-count: ;
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.