![]() Image is letterboxed within the container. contain A keyword that scales the image as large as possible and maintains image aspect ratio (image doesn't get squished). ![]() auto A keyword that scales the background image in the corresponding direction such that its intrinsic proportion is maintained. If the background's attachment is fixed, the background positioning area is instead the entire area of the browser window, not including the area covered by scrollbars if they are present. The background positioning area is, by default, the area containing the content of the box and its padding the area may also be changed to just the content or to the area containing borders, padding, and content. A value that scales the background image in the corresponding dimension to the specified percentage of the background positioning area, which is determined by the value of background-origin. * Global values */ background-size: inherit īackground-size: unset Values A value that scales the background image to the specified length in the corresponding dimension. * Multiple backgrounds values by background-image */ /* Do not confuse this with background-size: auto auto */ background-size: auto, auto * Two-value syntax */ /* first value: width of the image, second value: height */ background-size: 50% auto * One-value syntax */ /* the width of the image (height set to 'auto') */ background-size: 50% Copy Code /* Keywords syntax */ background-size: cover
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |