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

mozilla

Revision 6313 of background-clip

  • Revision slug: CSS/background-clip
  • Revision title: background-clip
  • Revision id: 6313
  • Created:
  • Creator: Jürgen Jeka
  • Is current revision? No
  • Comment 118 words added, 34 words removed

Revision Content

{{ CSSMozExtensionRef() }}

Summary

In Gecko-based applications like Firefox the -moz-background-clip CSS property specifies whether an element's background extends underneath its border. This only has any visual effect when the border has transparent regions (because of {{ Cssxref("border-style") }}) or partially opaque regions; otherwise the border covers up the difference.

  • {{ Xref_cssinitial() }}: border
  • Applies to: all elements
  • {{ Xref_cssinherited() }}: no
  • Media: {{ Xref_cssvisual() }}
  • {{ Xref_csscomputed() }}: ?

-moz-background-clip is an experimental implementation of the proposed CSS 3 {{ Cssxref("background-clip") }} property, which has not yet reached Candidate Recommendation (call for implementations).

Syntax

-moz-background-clip:  border | padding

Values

border
The background extends to the outside edge of the border (but underneath the border in z-ordering). Default value in Gecko/firefox, Safari/Webkit, Opera, and Internet Explorer 8.
padding
The background extends to the outside edge of the padding. Default value in IE 4-7.

Examples

pre {
  border: 1em navy;
  border-style: dotted double;
  background-color: tomato;
  /* The red background will not go behind the border */
     -moz-background-clip: padding;
  -webkit-background-clip: padding;
}

Specifications

Browser compatibility

Browser Lowest Version Support of
Internet Explorer --- ---
Firefox (Gecko) yes (?) -moz-background-clip: padding | border
Opera --- ---
Safari (WebKit) yes (?) -webkit-background-clip: padding | border

See also

{{ Cssxref("-moz-background-origin") }}

{{ languages( { "fr": "fr/CSS/-moz-background-clip", "ja": "ja/CSS/-moz-background-clip", "pl": "pl/CSS/-moz-background-clip" } ) }}

Revision Source

<p>{{ CSSMozExtensionRef() }}</p>
<h3>Summary</h3>
<p>In <a href="/en/Gecko" title="en/Gecko">Gecko</a>-based applications like Firefox the <code>-moz-background-clip</code> CSS property specifies whether an element's background extends underneath its border. This only has any visual effect when the border has transparent regions (because of {{ Cssxref("border-style") }}) or partially opaque regions; otherwise the border covers up the difference.</p>
<ul> <li>{{ Xref_cssinitial() }}:<code> border</code></li> <li>Applies to: all elements</li> <li>{{ Xref_cssinherited() }}: no</li> <li>Media: {{ Xref_cssvisual() }}</li> <li>{{ Xref_csscomputed() }}: ?</li>
</ul>
<p><code>-moz-background-clip </code>is an experimental implementation of the proposed CSS 3 {{ Cssxref("background-clip") }} property, which has not yet reached Candidate Recommendation (call for implementations).</p>
<h3>Syntax</h3>
<pre>-moz-background-clip:  border | padding
</pre>
<h3>Values</h3>
<dl> <dt> border</dt> <dd> The background extends to the outside edge of the border (but underneath the border in z-ordering). Default value in Gecko/firefox, Safari/Webkit, Opera, and Internet Explorer 8.<br> </dd> <dt> padding</dt> <dd> The background extends to the outside edge of the padding. Default value in IE 4-7.<br> </dd>
</dl>
<h3>Examples</h3>
<pre style="border:1em navy; border-style:dotted double; background-color:tomato; -moz-background-clip:padding; -webkit-background-clip:padding;">pre {
  border: 1em navy;
  border-style: dotted double;
  background-color: tomato;
  /* The red background will not go behind the border */
     -moz-background-clip: padding;
  -webkit-background-clip: padding;
}
</pre>
<h3>Specifications</h3>
<ul> <li><a class="external" href="http://www.w3.org/TR/css3-background/#the-background-clip" title="http://www.w3.org/TR/css3-background/#the-background-clip">CSS 3 Backgrounds and Borders#background-clip</a> Working draft</li>
</ul>
<h3>Browser compatibility</h3>
<table class="standard-table"> <tbody> <tr> <th>Browser</th> <th>Lowest Version</th> <th>Support of</th> </tr> <tr> <td>Internet Explorer</td> <td>---</td> <td>---</td> </tr> <tr> <td>Firefox (Gecko)</td> <td>yes (?)</td> <td><code>-moz-background-clip: padding | border</code></td> </tr> <tr> <td>Opera</td> <td>---</td> <td>---</td> </tr> <tr> <td>Safari (WebKit)</td> <td>yes (?)</td> <td><code>-webkit-background-clip: padding | border</code></td> </tr> </tbody>
</table>
<h3>See also</h3>
<p>{{ Cssxref("-moz-background-origin") }}</p>
<p>{{ languages( { "fr": "fr/CSS/-moz-background-clip", "ja": "ja/CSS/-moz-background-clip", "pl": "pl/CSS/-moz-background-clip" } ) }}</p>
Revert to this revision