Style borderImageWidth 属性

Style 对象参考手册 Style 对象

实例

规定图像边框的宽度:

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

尝试一下 »

定义和用法

borderImageWidth 属性规定图像边框的宽度。


浏览器支持

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Opera 不支持 borderImageWidth 属性。

Internet Explorer 10 及其之前的版本不支持 borderImageWidth 属性。

Safari 5 及其之前的版本不支持 borderImageWidth 属性。

请参阅 borderImage 属性来替代它!


语法

返回 borderImageWidth 属性:

object.style.borderImageWidth

设置 borderImageWidth 属性:

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

属性值

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

技术细节

默认值:1
返回值:字符串,表示元素的 border-image-width 属性。
CSS 版本CSS3


相关文章

CSS 参考手册:border-image-width 属性


Style 对象参考手册 Style 对象

0 个评论

要回复文章请先登录注册