MDN may have intermittent access issues April 18 13:00 - April 19 01:00 UTC. See whistlepig.mozilla.org for all notifications.

mozilla

Revision 25777 of mask

  • Revision slug: CSS/mask
  • Revision title: mask
  • Revision id: 25777
  • Created:
  • Creator: Bzbarsky
  • Is current revision? No
  • Comment no changes

Revision Content

{{ CSSRef() }}

Summary

 

  • {{ Xref_cssinitial() }}: none
  • Applies to: all elements
  • {{ Xref_cssinherited() }}: no
  • Percentages: n/a
  • Media: {{ Xref_cssvisual() }}
  • {{ Xref_csscomputed() }}:
  • Animatable: yes

Syntax

mask: <uri> | none | inherit

Values

If the value is a URI value, the element pointed to by the URI is used as an SVG mask.

Examples

.target { mask: url(#c1); }

.anothertarget { mask: url(resources.svg#c1); }

Specifications

Browser compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support Applies only to SVG elements {{ CompatGeckoDesktop("1.9.1") }} {{ CompatUnknown() }} Applies only to SVG elements Applies only to SVG elements
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support {{ CompatUnknown() }} {{ CompatGeckoMobile("1.9.1") }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }}

See also

Revision Source

<p>{{ CSSRef() }}</p>
<h3>Summary</h3>
<p> </p>
<ul> <li>{{ Xref_cssinitial() }}: none</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() }}:</li> <li>Animatable: yes</li>
</ul>
<h3>Syntax</h3>
<pre class="eval">mask: &lt;uri&gt; | none | inherit
</pre>
<h3>Values</h3>
<p>If the value is a URI value, the element pointed to by the URI is used as an SVG mask.</p>
<h3>Examples</h3>
<pre>.target { mask: url(#c1); }

.anothertarget { mask: url(resources.svg#c1); }
</pre>
<h3>Specifications</h3>
<ul> <li><a class="external" href="http://www.w3.org/TR/2000/03/WD-SVG-20000303/masking.html#Masking" title="http://www.w3.org/TR/2000/03/WD-SVG-20000303/masking.html#ClipPathElement">Clipping, Masking and Compositing</a></li> <li><a class="external" href="http://www.w3.org/TR/css3-roadmap/#svg" title="http://www.w3.org/TR/css3-roadmap/#svg">CSS 3 SVG</a></li> <li><a class="external" href="http://www.w3.org/Graphics/SVG/" title="http://www.w3.org/Graphics/SVG/">SVG</a></li>
</ul>
<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>Applies only to SVG elements</td> <td>{{ CompatGeckoDesktop("1.9.1") }}</td> <td>{{ CompatUnknown() }}</td> <td>Applies only to SVG elements</td> <td>Applies only to SVG elements</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>{{ CompatUnknown() }}</td> <td>{{ CompatGeckoMobile("1.9.1") }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> </tr> </tbody> </table>
</div>
<h3>See also</h3>
<ul> <li>{{ Cssxref("clip-path") }}, {{ Cssxref("filter") }}</li> <li><a class="internal" href="/En/Applying_SVG_effects_to_HTML_content" title="En/Applying SVG effects to HTML content">Applying SVG effects to HTML content</a></li> <li><a class="internal" href="/en/SVG" title="En/SVG">SVG</a></li>
</ul>
Revert to this revision