Contact Us | +1 888 239-0733 (Toll free US/CA) Mon-Fri: 7:30am to 4:30pm (PST)
The CSS 'background-size' property specifies the size of the background images. The size can be set as specific dimensions, scaled to fit the content in various ways, or stretched to cover the element's background area. This property is key for designing responsive backgrounds that adapt to the element's size and ensuring that background images are displayed correctly across different screen sizes and resolutions.
See the Pen
CSS 'background-size' Property by Webzstore (@webzstore)
on CodePen. The 'background-size' property is an essential tool for web designers and developers, allowing for versatile background image styling that can adapt to various design needs and enhance the visual appeal of web content. Use 'background-size' to control how a background image should be scaled or stretched within an element. This is particularly useful for creating full-width backgrounds that cover an area without distorting the image's aspect ratio, effectively tiling small images, or fitting an image precisely to a specific design area.CSS 'background-size' Property Examples
Browser Support For 'background-size' Property
4.0
3.6 -moz-4.1
3.0 -webkit-4.0
1.0 -webkit-9.0 10.5
10.0 -o-CSS Syntax of the 'background-size' Property
background-size: auto | length | percentage | cover | contain | initial | inherit ;
Usage of the 'background-size' Property
Property Values of the 'background-size' Property
"*" indicates required fields