Style borderImageSlice attribute
- Tura zuwa baya
- Daukaka
- Tura zuwa ɗaya ɗaya HTML DOM Style Object
Definition and usage
borderImageSlice
Attribute specifies the inward offset of the image border.
See also:
CSS Reference Manual:border-image-slice attribute
Example
Specify 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 value relative to 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
Tashoshin da yake cikin ɗanin sun nuna sabon ɗanin da suka gudanar da ɗanin a farko.}
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Gudanarwa | 11.0 | Gudanarwa | 6.0 | 15.0 |
Nuna borderImage ɗanin!
- Tura zuwa baya
- Daukaka
- Tura zuwa ɗaya ɗaya HTML DOM Style Object