Backgrounds Flashcards
What is the background layer in CSS?
A specialized layer behind every CSS box.
What is the initial value of the background-color property?
Transparent.
What does the background-image property do?
Places an image on top of the background color.
What values does background-image accept?
Image URLs (url()) and dynamically created gradients.
What do CSS gradient functions do?
Generate background images by passing two or more colors.
What is the default behavior of background images in CSS?
They repeat horizontally and vertically to fill the background layer.
What does the background-repeat property do?
Changes the default repeating behavior of background images.
What are the possible values for background-repeat?
repeat (image repeats in available space)
round (fits as many instances as possible without cropping)
space (repeats without cropping horizontally)
When does the background-position property apply?
When the background is set to no-repeat.
What does the background-size property do?
Sets the size of background images.
- What are the possible values for background-size?
Default (intrinsic value)
Length
Percentage
Keywords (auto, cover, contain)
How does CSS handle multiple background images?
They are defined from top to bottom, with the first background closest to the user.
Why is the order important in the background shorthand?
Position and size must be specified together and separated by a slash (/).