Problem Statement
Explain how keyframes work with an example.
Explanation
`@keyframes` define stages of an animation using percentages. Each stage sets different CSS properties. For example, a fade-in uses `from {opacity:0}` and `to {opacity:1}`. The animation plays over the defined duration and can loop or reverse based on configuration.
Code Solution
SolutionRead Only
@keyframes fadeIn { from{opacity:0;} to{opacity:1;} } .box{ animation: fadeIn 2s ease; }Practice Sets
This question appears in the following practice sets:
