border-image-source

  • Revision slug: CSS/border-image-source
  • Revision title: border-image-source
  • Revision id: 41657
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment 20 words added

Revision Content

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.

Though any {{ xref_cssimage() }} can be used with this CSS property, browser-support is still limited and some of them supports 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-style: none                                  /* no border-image, use the specified border-style */
border-style: url(image.jpg)                        /* the image.jpg is used as image */
border-style: linear-gradient(to top, red, yellow)  /* a gradient is used as image */

border-style: inherit

Specifications

Specification Status Comment
CSS Backgrounds and Borders Module Level 3 {{ Spec2('CSS3 Backgrounds') }} Initial specification

Revision Source

<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">Though any {{ xref_cssimage() }} can be used with this CSS property, browser-support is still limited and some of them supports only images defined using the <code>url()</code> functional notation.</div>
<ul class="cssprop" style="display:table;padding: 0.4em;border-left:0.15em solid;background-color:#eeeeff"> <li style="display:table-row;padding: 3px;margin:0;"><dfn style="display:table-cell;padding: 0 5px;border-bottom: none;cursor:inherit;">{{ Xref_cssinitial() }}:</dfn> <code>none</code></li> <li style="display:table-row;padding: 3px;margin:0;"><dfn style="display:table-cell;padding: 0 5px;border-bottom: none;cursor:inherit;">Applies to:</dfn> all elements, except internal table elements when {{ cssxref("border-collapse") }} is set to <code>collapse</code>.</li> <li style="display:table-row;padding: 3px;margin:0;"><dfn style="display:table-cell;padding: 0 5px;border-bottom: none;cursor:inherit;">{{ Xref_cssinherited() }}:</dfn> no</li> <li style="display:table-row;padding: 3px;margin:0;"><dfn style="display:table-cell;padding: 0 5px;border-bottom: none;cursor:inherit;">Media:</dfn> {{ Xref_cssvisual() }}</li> <li style="display:table-row;padding: 3px;margin:0;"><dfn style="display:table-cell;padding: 0 5px;border-bottom: none;cursor:inherit;">{{ Xref_csscomputed() }}:</dfn> <code>none</code>, or the image with its URI made absolute.</li> <li style="display:table-row;padding: 3px;margin:0;"><dfn style="display:table-cell;padding: 0 5px;border-bottom: none;cursor:inherit;">Animatable:</dfn> no</li>
</ul>
<h2 style="display:table-row;padding: 3px;margin:0;">Syntax</h2>
<pre class="eval syntaxbox" style="border:1px solid #cccccc;border-bottom: none; margin-bottom:0;background-color:#ffe;border-top-right-radius:1em;border-top-left-radius:1em;">Formal grammar: none | &lt;image&gt; 
</pre>
<pre style="border:1px solid #cccccc;border-bottom-right-radius:1em;border-bottom-left-radius:1em;border-top:none;margin-top:0;">border-style: none                                  /* no border-image, use the specified border-style */
border-style: url(image.jpg)                        /* the image.jpg is used as image */
border-style: linear-gradient(to top, red, yellow)  /* a gradient is used as image */

border-style: inherit
</pre>
<h2 name="Specifications">Specifications</h2>
<table class="standard-table"> <thead> <tr style="background-color: rgb(255, 204, 255);"> <th scope="col">Specification</th> <th scope="col">Status</th> <th scope="col">Comment</th> </tr> </thead> <tbody> <tr> <td><a class="external" href="http://dev.w3.org/csswg/css3-background/#the-border-image-source" title="http://dev.w3.org/csswg/css3-background/#the-border-image-source">CSS Backgrounds and Borders Module Level 3</a></td> <td>{{ Spec2('CSS3 Backgrounds') }}</td> <td>Initial specification</td> </tr> </tbody>
</table>
Revert to this revision