0
0
Tailwindmarkup~20 mins

Custom keyframe animations in Tailwind - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Master of Custom Keyframe Animations
Get all challenges correct to earn this badge!
Test your skills under time pressure!
📝 Syntax
intermediate
2:00remaining
Identify the correct Tailwind CSS custom keyframe syntax
Which option correctly defines a custom keyframe animation named fadeIn in Tailwind CSS configuration?
A"keyframes": { 'fadeIn': { '0%': { opacity: 0 }, '100%': { opacity: 1 } } }
B"keyframes": { "fadeIn": { "0%": { opacity: '0' }, "100%": { opacity: '1' } } }
C"keyframes": { fadeIn: { 'from': { opacity: 0 }, 'to': { opacity: 1 } } }
D"keyframes": { fadeIn: { 0: { opacity: '0' }, 100: { opacity: '1' } } }
Attempts:
2 left
💡 Hint
Remember that keys for percentages must be strings with % sign, and opacity values are numbers without quotes.
rendering
intermediate
2:00remaining
What visual effect does this Tailwind animation produce?
Given this Tailwind CSS animation configuration and usage, what will you see in the browser?

module.exports = {
  theme: {
    extend: {
      keyframes: {
        slideRight: {
          '0%': { transform: 'translateX(0)' },
          '100%': { transform: 'translateX(100px)' }
        }
      },
      animation: {
        slideRight: 'slideRight 2s ease-in-out forwards'
      }
    }
  }
}


AA blue square rotates 360 degrees in 2 seconds.
BA blue square fades out gradually over 2 seconds.
CA blue square moves smoothly 100 pixels to the right over 2 seconds and stays there.
DA blue square moves 100 pixels to the left and then returns to start.
Attempts:
2 left
💡 Hint
Look at the transform property and the animation direction.
selector
advanced
2:00remaining
Which Tailwind utility applies a custom animation named 'bounceSlow'?
If you define a custom animation named bounceSlow in Tailwind config, which class applies it correctly to an element?
AbounceSlow-animate
Banimation-bounceSlow
Canimate__bounceSlow
Danimate-bounceSlow
Attempts:
2 left
💡 Hint
Tailwind animation utilities start with 'animate-' prefix.
layout
advanced
2:00remaining
How to combine custom keyframe animation with Flexbox layout in Tailwind?
You want a container to center its children horizontally and vertically and apply a custom fade-in animation on load. Which Tailwind classes achieve this?
Agrid place-items-center animate-fadeIn
Bflex justify-center items-center animate-fadeIn
Cflex justify-center animate-fadeIn
Dflex items-center animate-fadeIn
Attempts:
2 left
💡 Hint
Flexbox centering requires both justify-center and items-center.
accessibility
expert
2:00remaining
How to ensure custom keyframe animations in Tailwind are accessible?
Which approach best improves accessibility when using custom animations in Tailwind CSS?
ARespect prefers-reduced-motion media query to disable animations for users who prefer less motion.
BUse very fast animations to minimize distraction.
CAdd aria-hidden="true" to animated elements to hide them from screen readers.
DUse only color changes in animations to avoid motion issues.
Attempts:
2 left
💡 Hint
Consider user preferences for motion sensitivity.