Style borderImageSlice attribute
- Previous Page
- Next Page
- Go to the Previous Level Object ng Style ng HTML DOM
Definition and usage
borderImageSlice
Attribute specifies the inward offset of the image border.
See also:
CSS Reference Manual:border-image-slice attribute
Example
Specifies the inward offset of the image border:
document.getElementById("myDIV").style.borderImageSlice = "50% 10%";
Syntax
Return borderImageSlice attribute:
object.style.borderImageSlice
Set borderImageSlice attribute:
object.style.borderImageSlice = "number|%|fill|initial|inherit"
Attribute value
Value | Description |
---|---|
number | Number, representing pixels in the image (if it is a raster image) or vector coordinates (if it is a vector image). |
% |
Percentage values relative to the image size: the width affects the horizontal offset, and the height affects the vertical offset. The default value is 100%. |
fill | Retain the middle part of the border image. |
initial | Sets this property to its default value. See initial. |
inherit | Inherits this property from its parent element. See inherit. |
Technical details
Default value: | 100% |
---|---|
Return value: | String, representing the element's border-image-slice attribute. |
CSS version: | CSS3 |
Browser supports
The numbers in the table indicate the first browser version that fully supports this attribute.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Supported | 11.0 | Supported | 6.0 | 15.0 |
Please Check borderImage Atribute!
- Previous Page
- Next Page
- Go to the Previous Level Object ng Style ng HTML DOM