Recall & Review
beginner
What does the Tailwind CSS class
bg-cover do?The <code>bg-cover</code> class makes the background image cover the entire element area, scaling it to fill while keeping its aspect ratio. Parts may be clipped.Click to reveal answer
beginner
How do you center a background image using Tailwind CSS?
Use the class
bg-center to position the background image in the center of the element.Click to reveal answer
intermediate
What is the difference between
bg-contain and bg-cover in Tailwind CSS?bg-contain scales the background image to fit inside the element without cropping, showing the whole image. bg-cover fills the element, possibly cropping parts of the image.Click to reveal answer
intermediate
Which Tailwind class would you use to position a background image at the top right corner?Use
bg-top-right to position the background image at the top right corner.Click to reveal answer
beginner
How can you make a background image not repeat using Tailwind CSS?
Use the class
bg-no-repeat to prevent the background image from repeating.Click to reveal answer
Which Tailwind class makes the background image cover the entire element area?
✗ Incorrect
bg-cover scales the background image to cover the whole element, possibly cropping parts.
What does
bg-contain do in Tailwind CSS?✗ Incorrect
bg-contain scales the image so it fits inside the element fully without cropping.
Which class centers the background image in Tailwind CSS?
✗ Incorrect
bg-center places the background image in the center of the element.
How do you stop a background image from repeating in Tailwind CSS?
✗ Incorrect
bg-no-repeat prevents the background image from repeating.
Which Tailwind class positions the background image at the top right?
✗ Incorrect
bg-top-right places the background image at the top right corner.
Explain how to control background image size and position using Tailwind CSS classes.
Think about how you want the image to fill or fit and where it should appear.
You got /4 concepts.
Describe the visual difference between using
bg-cover and bg-contain on a background image.Consider how the image scales and if any part is hidden.
You got /4 concepts.