BackgroundRepeat class
The background-repeat CSS property sets how background images are
repeated. A background image can be repeated along the horizontal
and vertical axes, or not repeated at all.
Read more: MDN background-repeat
Constructors
- BackgroundRepeat.axis(BackgroundAxisRepeat x, BackgroundAxisRepeat y)
-
Create an axis-specific repeat value from two axis repeat values.
constfactory
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- inherit → const BackgroundRepeat
- initial → const BackgroundRepeat
- noRepeat → const BackgroundRepeat
- The image is not repeated (and hence the background image painting area will not necessarily be entirely covered). The position of the non-repeated background image is defined by the background-position CSS property.
- repeat → const BackgroundRepeat
- The default value. The image is repeated as many times as needed to cover the entire background image painting area, with the edge image being clipped if the dimension of the painting area is not a multiple of the dimension of your background image.
- repeatX → const BackgroundRepeat
- The background image repeats horizontally only, with the edge image being clipped if the width of the paint area is not a multiple of the background image's width.
- repeatY → const BackgroundRepeat
- The background image repeats vertically only, with the edge image being clipped if the height of the paint area is not a multiple of the background image's height.
- revert → const BackgroundRepeat
- revertLayer → const BackgroundRepeat
- round → const BackgroundRepeat
-
As the allowed space increases in size, the repeated images will stretch (leaving no gaps) until there is room for
another one to be added. This is the only
<repeat-style>value that can lead to the distortion of the background image's aspect ratio, which will occur if the aspect ratio of the background image differs from the aspect ratio of the background paint area. - space → const BackgroundRepeat
- The image is repeated as much as possible without clipping. The first and last images are pinned to either side of the element, and whitespace is distributed evenly between the images. The background-position property is ignored unless only one image can be displayed without clipping. The only case where clipping happens using space is when there isn't enough room to display one image.
- unset → const BackgroundRepeat