Style borderImageSliceProperty

Style 对象参考手册Style Object

Example

Specifies the inward offsets of the image border:

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

Try it Yourself »

Definition and Usage

The borderImageSlice property specifies the inward offsets of the image border.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

Opera does not support the borderImageSlice property.

Internet Explorer 10 and earlier versions do not support the borderImageSlice property.

Safari 5 and earlier versions do not support the borderImageSlice property.

See alsoborderImageproperty instead!


Syntax

Return the borderImageSlice property:

object.style.borderImageSlice

Set the borderImageSlice property:

object.style.borderImageSlice="number|%|fill|initial|inherit"

Property Values

Value Description
number A number representing image pixels (if the image is a raster image) or vector coordinates (if the image is a vector image).
% A percentage representing the size of the image relative to the image: horizontal offsets refer to the width of the image, vertical offsets refer to the height of the image. The default value is 100%.
fill Preserves the middle part of the border image.
initial Sets this property to its default value. See alsoinitial。
inherit Inherits this property from its parent element. See alsoinherit。

Technical Details

Default value: 100%
Return value: A string representing the border-image-slice property of an element.
CSS Version CSS3


Related Articles

CSS Reference Manual:border-image-slice property


Style 对象参考手册Style Object

Other Extensions