Style borderImageWidthProperty

Style 对象参考手册Style Object

Examples

Specify the width of the image border:

document.getElementById("myDIV").style.borderImageWidth="20px 30px";

Try it yourself »

Definition and Usage

The borderImageWidth property specifies the width of the image border.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

Opera does not support the borderImageWidth property.

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

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

SeeborderImagethe property to replace it!


Syntax

Return the borderImageWidth property:

object.style.borderImageWidth

Set the borderImageWidth property:

object.style.borderImageWidth="number|%|auto|initial|inherit"

Property Values

Value Description
length A length unit (px) specifying the size of the border width. A length unit (px) specifying the size of the border-width
number The default value is 1. Specifies a multiple of the corresponding border width.
% A percentage relative to the size of the border image area: horizontal offsets are relative to the width of the area, and vertical offsets are relative to the height of the area.
auto If this property is specified, the width is the intrinsic width or height of the corresponding image slice.
initial Sets this property to its default value. Seeinitial。
inherit Inherits this property from its parent element. Seeinherit。

Technical Details

Default value: 1
Return value: A string representing the element's border-image-width property.
CSS Version CSS3


Related Articles

CSS Reference Manual:border-image-width property


Style 对象参考手册Style Object

Other Extensions