Revision 6316 of background-clip

  • Revision slug: CSS/background-clip
  • Revision title: background-clip
  • Revision id: 6316
  • Created:
  • Creator: Jürgen Jeka
  • Is current revision? No
  • Comment IE7 behaviour documented; 54 words added, 3 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() }}: ?

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, but see {{ anch("Browser_compatibility") }} section below for special case Internet Explorer 7.
padding
The background extends to the outside edge of the padding.

Examples

pre {
  border: 1em navy;
  border-style: dotted double;
  background: 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 (?) [fixme] -moz-background-clip: padding | border
Opera --- ---
Safari (WebKit) yes (?) [fixme] -webkit-background-clip: padding | border

[*]  IE 7 (no other versions of IE) behaves like background-clip:padding if overflow: hidden | auto | scroll.

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>
<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).<br> Default value, but see {{ anch("Browser_compatibility") }} section below for special case Internet Explorer 7. </dd> <dt>padding</dt> <dd>The background extends to the outside edge of the padding.</dd>
</dl>
<h3>Examples</h3>
<pre style="overflow:visible; border:1em navy; border-style:dotted double; background:tomato; -moz-background-clip:padding; -webkit-background-clip:padding;">pre {
  border: 1em navy;
  border-style: dotted double;
  background: 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 (?) [fixme]</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 (?) [fixme]</td> <td><code>-webkit-background-clip: padding | border</code></td> </tr> </tbody>
</table>
<p>[*]  IE 7 (no other versions of IE) behaves like<code> background-clip:padding </code>if<code> overflow: hidden | auto | scroll</code>.</p>
<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