mozilla

-webkit-mask-repeat

Non-standard
This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

The -webkit-mask-repeat property specifies whether a mask image is repeated (tiled), and how.

Syntax

-webkit-mask-repeat: <repeat-style>[, <repeat-style>]*

Where:

<repeat-style>
repeat | repeat-x | repeat-y | no-repeat | inherit

Values

repeat
The mask image is repeated both horizontally and vertically.
repeat-x
The mask image is repeated horizontally only.
repeat-y
The mask image is repeated vertically only.
no-repeat
The mask image is not repeated; only one copy of the mask image is drawn. The remainder of the masked element's content is not displayed.

Examples

.exampleone {
    -webkit-mask-image: url('mask.png');
    -webkit-mask-repeat: repeat-x;
}

.exampletwo {
    -webkit-mask-image: url('mask.png');
    -webkit-mask-repeat: no-repeat;
}

Multiple mask image support

You can specify a different <repeat-style> for each mask image, separated by commas:

.examplethree {
    -webkit-mask-image: url('mask1.png'), url('mask2.png');
    -webkit-mask-repeat: repeat-x, repeat-y;
} 

Each image is matched with the corresponding repeat style, from first specified to last.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 1.0 Not supported Not supported Not supported 4.0
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support 2.1 ? ? ? 3.2

See also

-webkit-mask, -webkit-mask-box-image-webkit-mask-clip-webkit-mask-origin, -webkit-mask-attachment, -webkit-mask-image, -webkit-mask-composite

Document Tags and Contributors

Tags: 
Contributors to this page: Sheppy, Jeremie, berkerpeksag, grendel, teoli, barlow, kscarfone
Last updated by: Jeremie,
Hide Sidebar