CSS3 border-image-width
Property
Topic: CSS3 Properties ReferencePrev|Next
Description
The border-image-width
CSS property specifies the width of the border.
The following table summarizes the usages context and the version history of this property.
Default value: | 1 |
---|---|
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-width
property in action.
Example
Try this code ».box {
width: 300px;
height: 150px;
border-image-source: url("border.png");
border-image-width: 10px;
border-image-slice: 30;
border-image-repeat: round;
}
Property Values
The following table describes the values of this property.
Value | Description |
---|---|
length | Specifies the width of the border in absolute or relative units. |
percentage | Specifies the width of the border as a percentage of the element. |
number | Represents a multiple of the computed value of the element's border-width property, or the width of the border box. |
auto |
Specifies that the border image width is the intrinsic width, or height, of the corresponding image slice. |
initial |
Sets this property to its default value. |
inherit |
If specified, the associated element takes the computed value of its parent element border-image-width property. |
Browser Compatibility
The border-image-width
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-source
, border-image-repeat
, border-image-slice
, border-image-outset
, border
.