Complete the code to add a smooth fade-in animation to a button using Tailwind CSS.
<button class="bg-blue-500 text-white py-2 px-4 rounded [1]">Click me</button>
The correct Tailwind CSS class for a fade-in animation is animate-fade-in. This class smoothly fades the button into view, enhancing user interaction by providing visual feedback.
Complete the code to add a hover scale animation effect to an image using Tailwind CSS.
<img src="image.jpg" alt="Sample" class="transition-transform duration-300 [1]">
hover: prefix to trigger animation on hover.The class hover:scale-110 scales the image to 110% of its size on hover, creating a smooth zoom effect that draws user attention.
Fix the error in the Tailwind class to make the button pulse continuously.
<button class="bg-green-500 text-white py-2 px-4 rounded [1]">Submit</button>
The correct Tailwind class for a continuous pulse animation is animate-pulse. Other options are not valid Tailwind classes and will not work.
Fill both blanks to create a button that changes color smoothly and grows slightly on hover.
<button class="bg-red-500 text-white py-2 px-4 rounded transition [1] [2]">Hover me</button>
The class duration-500 sets the transition duration to 500ms, and hover:bg-red-700 changes the background color on hover smoothly.
Fill all three blanks to create a card that fades in, moves up slightly, and grows on hover with smooth transitions.
<div class="bg-white p-6 rounded shadow-lg transition [1] [2] [3]">Card Content</div>
animate-fadeIn makes the card fade in on load, hover:translate-y-[-5px] moves it up slightly on hover, and hover:scale-105 grows it a bit. Together with duration-700 (optional), these create a smooth interactive effect.