Recall & Review
beginner
What does an opacity modifier do in Tailwind CSS?
It changes how transparent a color looks, making it see-through to some degree.
Click to reveal answer
beginner
How do you apply 50% opacity to a background color in Tailwind?
Use a color with an opacity suffix like
bg-blue-500/50 where /50 means 50% opacity.Click to reveal answer
beginner
What range of values can you use for opacity modifiers in Tailwind?
You can use values from 0 to 100, where 0 is fully transparent and 100 is fully opaque.
Click to reveal answer
intermediate
True or False: Opacity modifiers affect only the color, not the whole element.
True. Opacity modifiers like
/50 change only the color's transparency, not the entire element's opacity.Click to reveal answer
beginner
How would you write a red text color with 30% opacity in Tailwind?
Use
text-red-500/30 to make the red text 30% opaque (70% transparent).Click to reveal answer
What does
bg-green-400/75 mean in Tailwind CSS?✗ Incorrect
The /75 means 75% opacity, so the green background is mostly solid but slightly transparent.
Which opacity modifier makes a color fully transparent?
✗ Incorrect
/0 means 0% opacity, which makes the color fully transparent (invisible).
Can you use opacity modifiers on text color in Tailwind?
✗ Incorrect
Opacity modifiers work on text colors too, for example text-blue-600/40 sets 40% opacity on the text color.
What happens if you omit the opacity modifier on a Tailwind color class?
✗ Incorrect
Without an opacity modifier, Tailwind colors are fully opaque by default.
Which of these is a valid Tailwind opacity modifier?
✗ Incorrect
Opacity modifiers must be between 0 and 100. /25 is valid; others are invalid.
Explain how opacity modifiers work on colors in Tailwind CSS and give an example.
Think about how you make a color partly see-through.
You got /3 concepts.
Describe the difference between using opacity modifiers on colors versus using the CSS opacity property on an element.
Consider what parts become transparent in each case.
You got /3 concepts.