border-image-source

  • Revision slug: CSS/border-image-source
  • Revision title: border-image-source
  • Revision id: 352237
  • Created:
  • Creator: wlach
  • Is current revision? No
  • Comment

Revision Content

{{ CSSRef() }}

Summary

The border-image-source CSS property defines the {{ xref_cssimage() }} to use instead of the style of the border. If this property is set to none, the style defined by {{ cssxref("border-style") }} is used instead.

Note: Though any {{ xref_cssimage() }} can be used with this CSS property, browser support is still limited and some browsers support only images defined using the url() functional notation.
  • {{ Xref_cssinitial() }} none
  • Applies to all elements, except internal table elements when {{ cssxref("border-collapse") }} is set to collapse.
  • {{ Xref_cssinherited() }} no
  • Media {{ Xref_cssvisual() }}
  • {{ Xref_csscomputed() }} none, or the image with its URI made absolute.
  • Animatable no

Syntax

Formal grammar: none | <image> 
border-image-source: none                                  /* no border-image, use the specified border-style */
border-image-source: url(image.jpg)                        /* the image.jpg is used as image */
border-image-source: linear-gradient(to top, red, yellow)  /* a gradient is used as image */

border-image-source: inherit

Examples

See {{cssxref("border-image")}} for examples of what the various source values will do.

Specifications

Specification Status Comment
{{ SpecName('CSS3 Backgrounds', '#border-image-source', 'border-image-source') }} {{ Spec2('CSS3 Backgrounds') }} Initial specification

Browser compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 15.0 {{ CompatGeckoDesktop("15.0") }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support {{ CompatUnknown() }} {{ CompatGeckoMobile("15.0") }} {{ CompatNo() }} {{ CompatUnknown() }} {{ CompatUnknown() }}

See also

  • {{ CSS_border_image() }}

Revision Source

<p>{{ CSSRef() }}</p>
<h2 id="Summary">Summary</h2>
<p>The <code>border-image-source</code> CSS property defines the {{ xref_cssimage() }} to use instead of the style of the border. If this property is set to <code>none</code>, the style defined by {{ cssxref("border-style") }} is used instead.</p>
<div class="note">
  <strong>Note:</strong> Though any {{ xref_cssimage() }} can be used with this CSS property, browser support is still limited and some browsers support only images defined using the <code>url()</code> functional notation.</div>
<ul class="cssprop">
  <li><dfn>{{ Xref_cssinitial() }}</dfn> <code>none</code></li>
  <li><dfn>Applies to</dfn> all elements, except internal table elements when {{ cssxref("border-collapse") }} is set to <code>collapse</code>.</li>
  <li><dfn>{{ Xref_cssinherited() }}</dfn> no</li>
  <li><dfn>Media</dfn> {{ Xref_cssvisual() }}</li>
  <li><dfn>{{ Xref_csscomputed() }}</dfn> <code>none</code>, or the image with its URI made absolute.</li>
  <li><dfn>Animatable</dfn> no</li>
</ul>
<h2 id="Syntax">Syntax</h2>
<pre class="twopartsyntaxbox">
Formal grammar: none | &lt;image&gt; 
</pre>
<pre>
border-image-source: none                                  /* no border-image, use the specified border-style */
border-image-source: url(image.jpg)                        /* the image.jpg is used as image */
border-image-source: linear-gradient(to top, red, yellow)  /* a gradient is used as image */

border-image-source: inherit
</pre>
<h2 id="Specifications" name="Specifications">Examples</h2>
<p>See {{cssxref("border-image")}} for examples of what the various source values will do.</p>
<h2 id="Specifications" name="Specifications">Specifications</h2>
<table class="standard-table">
  <thead>
    <tr>
      <th scope="col">Specification</th>
      <th scope="col">Status</th>
      <th scope="col">Comment</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>{{ SpecName('CSS3 Backgrounds', '#border-image-source', 'border-image-source') }}</td>
      <td>{{ Spec2('CSS3 Backgrounds') }}</td>
      <td>Initial specification</td>
    </tr>
  </tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<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</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>15.0</td>
        <td>{{ CompatGeckoDesktop("15.0") }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</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&nbsp;Phone</th>
        <th>Opera Mobile</th>
        <th>Safari Mobile</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatGeckoMobile("15.0") }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatUnknown() }}</td>
      </tr>
    </tbody>
  </table>
</div>
<h3 id="See_also">See also</h3>
<ul>
  <li>{{ CSS_border_image() }}</li>
</ul>
Revert to this revision