-webkit-mask-repeat

  • Revision slug: CSS/-webkit-mask-repeat
  • Revision title: -webkit-mask-repeat
  • Revision id: 49028
  • Created:
  • Creator: berkerpeksag
  • Is current revision? No
  • Comment 8 words added, 8 words removed

Revision Content

{{ CSSRef() }}

Summary

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

  • {{ Xref_cssinitial() }}: repeat
  • Applies to: all elements
  • {{ Xref_cssinherited() }}: no
  • Percentages: N/A
  • Media: {{ Xref_cssvisual() }}
  • {{ Xref_csscomputed() }}: as specified

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

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 1.0 {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }} 4.0
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support 2.1 {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }} 3.2

See also

{{ cssxref("-webkit-mask") }}, {{ cssxref("-webkit-mask-box-image") }}, {{ cssxref("-webkit-mask-clip") }}, {{ cssxref("-webkit-mask-origin") }}, {{ cssxref("-webkit-mask-attachment") }}, {{ cssxref("-webkit-mask-image") }},{{ cssxref("-webkit-mask-composite") }}

Revision Source

<p>{{ CSSRef() }}</p>
<h3 name="Summary">Summary</h3>
<p>The <code>-webkit-mask-repeat</code> property specifies whether a mask image is repeated (tiled), and how.</p>
<ul> <li>{{ Xref_cssinitial() }}: repeat</li> <li>Applies to: all elements</li> <li>{{ Xref_cssinherited() }}: no</li> <li>Percentages: N/A</li> <li>Media: {{ Xref_cssvisual() }}</li> <li>{{ Xref_csscomputed() }}: as specified</li>
</ul>
<h3 name="Syntax">Syntax</h3>
<pre class="eval">-webkit-mask-repeat: &lt;repeat-style&gt;[, &lt;repeat-style&gt;]*
</pre>
<p>Where:</p>
<dl> <dt>&lt;repeat-style&gt;</dt> <dd><code>repeat | repeat-x | repeat-y | no-repeat | inherit</code></dd>
</dl>
<h3 name="Values">Values</h3>
<dl> <dt>repeat</dt> <dd>The mask image is repeated both horizontally and vertically.</dd> <dt>repeat-x</dt> <dd>The mask image is repeated horizontally only.</dd> <dt>repeat-y</dt> <dd>The mask image is repeated vertically only.</dd> <dt>no-repeat</dt> <dd>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.</dd>
</dl>
<h3 name="Examples">Examples</h3>
<pre class="brush: css">.exampleone {
    -webkit-mask-image: url('mask.png');
    -webkit-mask-repeat: repeat-x;
}

.exampletwo {
    -webkit-mask-image: url('mask.png');
    -webkit-mask-repeat: no-repeat;
}
</pre>
<h4>Multiple mask image support</h4>
<p>You can specify a different <code>&lt;repeat-style&gt;</code> for each mask image, separated by commas:</p>
<pre class="brush: css">.examplethree {
    -webkit-mask-image: url('mask1.png'), url('mask2.png');
    -webkit-mask-repeat: repeat-x, repeat-y;
} 
</pre>
<p>Each image is matched with the corresponding repeat style, from first specified to last.</p><h3 name="Browser_Compatibility">Browser compatibility</h3>
<p>{{ CompatibilityTable() }}</p>
<div id="compat-desktop"> <table class="compat-table"> <tbody> <tr> <th>Feature</th> <th>Chrome</th> <th>Firefox (Gecko)</th> <th>Internet Explorer</th> <th>Opera</th> <th>Safari (WebKit)</th> </tr> <tr> <td>Basic support</td> <td>1.0</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }}</td> <td>4.0</td> </tr> </tbody> </table>
</div>
<div id="compat-mobile"> <table class="compat-table"> <tbody> <tr> <th>Feature</th> <th>Android</th> <th>Firefox Mobile (Gecko)</th> <th>IE Phone</th> <th>Opera Mobile</th> <th>Safari Mobile</th> </tr> <tr> <td>Basic support</td> <td>2.1</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> <td>3.2</td> </tr> </tbody> </table>
</div>
<h3>See also</h3>
<p>{{ cssxref("-webkit-mask") }}, {{ cssxref("-webkit-mask-box-image") }}, {{ cssxref("-webkit-mask-clip") }}, {{ cssxref("-webkit-mask-origin") }}, {{ cssxref("-webkit-mask-attachment") }}, {{ cssxref("-webkit-mask-image") }},{{ cssxref("-webkit-mask-composite") }}</p>
Revert to this revision