0
0
Tailwindmarkup~20 mins

Bounce animation (attention) in Tailwind - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Bounce Animation Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
rendering
intermediate
1:30remaining
What will this Tailwind CSS code visually do?
Look at this HTML snippet using Tailwind CSS classes. What animation effect will the blue button show when viewed in a browser?
Tailwind
<button class="bg-blue-500 text-white font-bold py-2 px-4 rounded animate-bounce">Click me</button>
AThe button will fade in and out slowly.
BThe button will smoothly bounce up and down repeatedly.
CThe button will spin continuously.
DThe button will shake left and right quickly.
Attempts:
2 left
💡 Hint
The class 'animate-bounce' in Tailwind triggers a vertical bouncing effect.
selector
intermediate
1:30remaining
Which Tailwind class controls the speed of the bounce animation?
You want to set the bounce animation duration to 1000ms. Which Tailwind CSS class should you add or change?
Aduration-1000
Banimate-slow
Cspeed-bounce
Danimate-duration
Attempts:
2 left
💡 Hint
Tailwind uses duration classes to control animation speed in milliseconds.
🧠 Conceptual
advanced
2:00remaining
Why is using animate-bounce good for attention but bad for accessibility if overused?
Consider a webpage with many elements using the bounce animation. What is a key accessibility concern?
ABounce animations cause the page to lose color contrast.
BBounce animations slow down page loading speed significantly.
CBounce animations prevent screen readers from reading the content.
DToo much bouncing can distract or cause discomfort for users with motion sensitivity.
Attempts:
2 left
💡 Hint
Think about users who might be sensitive to motion or flashing effects.
📝 Syntax
advanced
1:30remaining
What error will this Tailwind class combination cause?
Look at this button code:
<button class="animate-bounce duration-xyz">Bounce</button>
What happens when the page loads?
Tailwind
<button class="animate-bounce duration-xyz">Bounce</button>
AThe animation runs with default speed; 'duration-xyz' is ignored.
BThe browser throws a syntax error and stops rendering the button.
CThe animation does not run because 'duration-xyz' is invalid and breaks Tailwind.
DThe button bounces but with a very fast speed.
Attempts:
2 left
💡 Hint
Invalid Tailwind classes are usually ignored, not breaking the page.
layout
expert
2:30remaining
How to center a bouncing button horizontally and vertically using Tailwind CSS?
You want a button with bounce animation to appear exactly in the center of the viewport. Which Tailwind class set achieves this best?
Tailwind
<button class="bg-red-500 text-white font-bold py-2 px-4 rounded animate-bounce">Bounce</button>
AUse 'absolute top-1/2 left-1/2' on the button without transform
BAdd classes 'mx-auto my-auto' directly to the button
CWrap the button in a div with classes: 'flex items-center justify-center h-screen w-screen'
DWrap the button in a div with 'grid place-items-start h-full w-full'
Attempts:
2 left
💡 Hint
Flexbox with center alignment is a common way to center content both ways.