Latest web development tutorials

HTML DOM Style borderImageWidth property

Style Object Reference Style Objects

Examples

Predetermined image border width:

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

try it"

Definition and Usage

borderImageWidth attribute specifies the width of the image border.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Opera does not support borderImageWidth property.

Internet Explorer version 10 and earlier are not supported borderImageWidth property.

Safari version 5 and earlier do not support borderImageWidth property.

See borderImage property to replace it!


grammar

Back borderImageWidth properties:

object .style.borderImageWidth

Setting borderImageWidth properties:

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

Property Value

描述
length 一个规定边框宽度大小的长度单位(px)。A length unit (px) specifying the size of the border-width
number 默认值是 1。表示相应的边框宽度的倍数。
% 相对于边框图像区域大小的百分比:水平偏移参照区域的宽度,垂直偏移参照区域的高度。
auto 如果规定了该属性,宽度是相应图像切片固有的宽度或高度。
initial 设置该属性为它的默认值。请参阅 initial
inherit 从父元素继承该属性。请参阅 inherit

technical details

Defaults: 1
return value: String representing the border-image-width attribute of the element.
CSS version CSS3


related articles

CSS Reference: border-width attribute-Image


Style Object Reference Style Objects