Set the size of background image using CSS ?
The background-size property is used to set the background image size using CSS. Use height and width property to set the size of the background image.
background-size: width height;
- If the first value is omitted then the image takes its original width.
- If the second value is omitted then the image takes its original height.
Example 1: This example sets the background-size into width and height.
Example 2: This example sets the background-size into percentage.