CSS border-image-slice Property
Example
#example1 {
border: 10px solid transparent;
padding: 15px;
border-image: url(border.png) round;
border-image-slice: 25%;
}
#example2 {
border: 10px solid transparent;
padding: 10px;
border-image: url(border.png) round;
border-image-slice: 50%;
}
#example3 {
border: 10px solid transparent;
padding: 10px;
border-image: url(border.png) round;
border-image-slice: 75%;
}
Hello World!
Meaning
The border-image-slice CSS property divides the image specified by border-image-source into regions. These regions form the components of an element's border image.
Default value: | 100% |
Inherited: | No |
Animatable: | No |
Version: | CSS3 |
JavaScript syntax: |
|
Standard Syntax
border-image-slice: number|%|fill|initial|inherit|revert|revert-layer|unset;
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
Status
Property Values
The following table describes the values of this property:
Value | Description |
---|---|
number | Represents distance in pixels of the image for raster images, or vector coordinates for vector images. |
%(percentage) | Relative to the size of the image: the width of the image for horizontal offsets, the height of the image for vertical offsets. |
fill | If present, preserves the middle portion of the image. Otherwise, the middle is treated as transparent. |
initial | Sets this property to its default value. |
inherit | If specified, the associated element takes the computed value of its parent element animation-delay property. |
revert | Reverts the cascaded value of the property from its current value to the value the property |
revert-layer | Rollback styles to the ones specified in previous cascade layers. |
unset | Resets a property to its inherited value if the property naturally inherits from its parent, and to its initial value if not. |
Default CSS Property Values
selectors {
border-image-slice: 100%;
}