![]() Example: An image with an original width of 260px, repeated three times, might stretch until each repetition is 300px wide, and then another image will be added. When the next image is added, all of the current ones compress to allow room. The only case where clipping happens using space is when there isn't enough room to display one image.Īs the allowed space increases in size, the repeated images will stretch (leaving no gaps) until there is room (space left >= half of the image width) for another one to be added. The background-position property is ignored unless only one image can be displayed without clipping. The first and last images are pinned to either side of the element, and whitespace is distributed evenly between the images. The image is repeated as much as possible without clipping. The last image will be clipped if it doesn't fit. The image is repeated as much as needed to cover the whole background image painting area. ![]() Here is an explanation of how each option works for either direction: repeat ![]() In the two-value syntax, the first value represents the horizontal repetition behavior and the second value represents the vertical behavior. Syntax Values The one-value syntax is a shorthand for the full two-value syntax: Single value The unique non-ambiguous order defined by the formal grammar It also applies to ::first-letter and ::first-line.Ī list, each item consisting of two keywords, one per dimension * Two-value syntax: horizontal | vertical */īy default, the repeated images are clipped to the size of the element, but they can be scaled to fit (using round) or evenly distributed from end to end (using space).Īll elements. A background image can be repeated along the horizontal axis, the vertical axis, both axes, or not repeated at all. The background-repeat CSS property defines how background images are repeated.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |