Drill 25: Trade-off — Transforms and keyframes
Explain the trade-off in this example.
What you will be able to do
- Explain the trade-off in this example.
Practice task
Explain the trade-off in this example.
@keyframes pop-in {
from {
opacity: 0;
transform: translateY(12px) scale(0.96);
}
to {
opacity: 1;
transform: translateY(0) scale(1);
}
}
.card {
animation: pop-in 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.spinner {
animation: spin 900ms linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
@media (prefers-reduced-motion: reduce) {
.card,
.spinner {
animation: none;
}
}Your turn
EasyWrite your answer
Explain the trade-off in this example.
TEXT · starter
Your answer…Study tools
Make it yours.
Keep a private note for this lesson, then turn the key ideas into flashcards you can revisit.
Sign in to save notes and flashcards.Both are private to your account and stay with your progress.
Sign inFinished reading?
Lock in what you just learned.
0%
Mark this lesson complete to save your place and move one step closer to the certificate.