CSS3 border-image-source
Property
Topic: CSS3 Properties ReferencePrev|Next
Description
The border-image-source
CSS property specifies the location of the image to be used for the border, instead of the border styles given by the border-style
propertiey.
The following table summarizes the usages context and the version history of this property.
Default value: | none |
---|---|
Applies to: | All elements, except internal table elements when border-collapse is collapse . It also applies to ::first-letter . |
Inherited: | No |
Animatable: | No. See animatable properties. |
Version: | New in CSS3 |
Syntax
The syntax of the property is given with:
The example below shows the border-image-source
property in action.
Example
Try this code ».box {
width: 300px;
height: 150px;
border-image-source: url("border.png");
border-image-slice: 30;
border-image-repeat: round;
}
Property Values
The following table describes the values of this property.
Value | Description |
---|---|
none |
No border-image, the border-style will be used. This is default value. |
image | Specifies the location of the border image. |
initial |
Sets this property to its default value. |
inherit |
If specified, the associated element takes the computed value of its parent element border-image-source property. |
Browser Compatibility
The border-image-source
property is supported in all major modern browsers.
Basic Support—
|
Further Reading
See tutorial on: CSS3 Border, CSS Border.
Related properties: border-image
, border-image-width
, border-image-repeat
, border-image-slice
, border-image-outset
, border
.