size of the background image
1
size of the background image
The size can be given as a width and height in pixels, or in percentages. With percentages, the size is relative to the box specified by background-origin. If only one value is given, it applies to both width and height.
Value | Description |
---|---|
Values | |
width height | width and height dimensions |
width% height% | relative width and height dimensions |
auto | preserves the image's original aspect ratio |
contain | |
cover |