0
0
Tailwindmarkup~5 mins

Background color utilities in Tailwind - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does the Tailwind CSS class bg-blue-500 do?
It sets the background color of an element to a medium shade of blue from Tailwind's default color palette.
Click to reveal answer
beginner
How do you apply a light gray background color using Tailwind CSS?
Use the class bg-gray-100 to apply a very light gray background color.
Click to reveal answer
intermediate
What is the purpose of the <code>bg-opacity-50</code> class in Tailwind CSS?
It sets the background color opacity to 50%, making the background semi-transparent.
Click to reveal answer
intermediate
How can you change the background color on hover using Tailwind CSS?
Use the hover:bg-colorname-shade class, for example hover:bg-red-400 changes background to red when hovered.
Click to reveal answer
beginner
What does the class bg-transparent do in Tailwind CSS?
It makes the background fully transparent, showing whatever is behind the element.
Click to reveal answer
Which Tailwind class sets a red background color?
Abg-red-500
Btext-red-500
Cborder-red-500
Dhover:text-red-500
How do you make a background color semi-transparent in Tailwind?
Atext-opacity-50
Bbg-opacity-50
Cbg-transparent
Dopacity-50
What does hover:bg-green-300 do?
AChanges text color to green when hovered
BChanges border color to green when hovered
CSets background green permanently
DChanges background to green when hovered
Which class makes the background fully transparent?
Abg-transparent
Bbg-white
Cbg-opacity-0
Dopacity-0
If you want a dark gray background, which class is best?
Abg-gray-100
Bbg-gray-200
Cbg-gray-800
Dbg-gray-400
Explain how to use Tailwind CSS classes to change an element's background color and make it change on hover.
Think about how you can combine normal and hover states with Tailwind classes.
You got /3 concepts.
    Describe how background opacity works in Tailwind CSS and how it differs from overall element opacity.
    Consider what parts of the element are affected by each opacity class.
    You got /3 concepts.