Style borderImageSlice attribute

Definition and usage

borderImageSlice Attribute specifies the inward offset of the image border.

See also:

CSS Reference Manual:border-image-slice property

Example

Specify the inward offset of the image border:

document.getElementById("myDIV").style.borderImageSlice = "50% 10%";

Try it yourself

Syntax

Return borderImageSlice property:

object.style.borderImageSlice

Set borderImageSlice property:

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 property.
CSS version: CSS3

Browser support

Talene i tabellen angiver den første browserversion, der fuldt ud understøtter egenskaben.

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Understøtter 11.0 Understøtter 6.0 15.0

Se venligst borderImage egenskab!