A. A blue button that smoothly moves up and down repeatedly
B. A static blue button with no movement
C. A button that fades in and out
D. A button that spins continuously
Solution
Step 1: Analyze the classes applied
The button has animate-bounce for bounce animation, bg-blue-500 for blue background, text-white for white text, p-4 for padding, and rounded for rounded corners.
Step 2: Predict the visual output
The button will appear blue with white text and will bounce up and down smoothly.
Final Answer:
A blue button that smoothly moves up and down repeatedly -> Option A
Quick Check:
animate-bounce = smooth up/down movement [OK]
Hint: Look for animate-bounce to see bouncing effect [OK]
Common Mistakes:
Ignoring the animate-bounce class effect
Confusing bounce with fade or spin
Assuming no animation without checking classes
4. You want a text element to bounce but your code <p class="bounce">Hello</p> does not animate. What is the problem?
medium
A. The <p> tag cannot be animated
B. Animations only work on buttons, not text
C. You need to add animation-bounce instead
D. The class name should be animate-bounce, not bounce
Solution
Step 1: Check the class name used
The class bounce is not a valid Tailwind animation class. The correct class is animate-bounce.
Step 2: Confirm element animatability
Paragraph tags can be animated with Tailwind classes, so the tag is not the issue.
Final Answer:
The class name should be animate-bounce, not bounce -> Option D
Quick Check:
Use exact class animate-bounce [OK]
Hint: Use full class name animate-bounce for animation [OK]
Common Mistakes:
Using incomplete class names like bounce
Thinking only buttons animate
Assuming tag type blocks animation
5. You want to create a bouncing icon that stops bouncing when hovered over. Which Tailwind CSS setup achieves this?
hard
A. <div class="animate-bounce hover:animate-none">🔔</div>
B. <div class="animate-bounce hover:animate-bounce">🔔</div>
C. <div class="bounce hover:none">🔔</div>
D. <div class="animate-bounce hover:stop-bounce">🔔</div>
Solution
Step 1: Understand Tailwind hover syntax
Tailwind uses hover: prefix to apply styles on hover. To stop animation on hover, use hover:animate-none.
Step 2: Check each option's correctness
<div class="animate-bounce hover:animate-none">🔔</div> correctly uses animate-bounce and stops animation on hover with hover:animate-none. Other options use invalid classes or do not stop animation.
Final Answer:
<div class="animate-bounce hover:animate-none">🔔</div> -> Option A
Quick Check:
Use hover:animate-none to stop bounce on hover [OK]
Hint: Use hover:animate-none to pause bounce on hover [OK]
Common Mistakes:
Using invalid class names like bounce or stop-bounce
Not using hover prefix correctly
Assuming hover disables animation without class
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.