HTML DOM Style borderImageSlice property
Examples
Predetermined image frame inwardly offset:
document.getElementById("myDIV").style.borderImageSlice="50% 10%";
try it"
Definition and Usage
Inwardly offset borderImageSlice attribute specifies the image border.
Browser Support
Opera does not support borderImageSlice property.
Internet Explorer version 10 and earlier are not supported borderImageSlice property.
Safari version 5 and earlier do not support borderImageSlice property.
See borderImage property to replace it!
grammar
Back borderImageSlice properties:
object .style.borderImageSlice
Setting borderImageSlice properties:
object .style.borderImageSlice="number|%|fill|initial|inherit"
Property Value
值 | 描述 |
---|---|
number | 表示图像像素(如果图像是光栅图像)或矢量坐标(如果图像是矢量图像)的数字。 |
% | 表示相对于图像大小的百分比:水平偏移参照图像的宽度,垂直偏移参照图像的高度。默认值是 100%。 |
fill | 使边框图像中间部分被保留下来。 |
initial | 设置该属性为它的默认值。请参阅 initial 。 |
inherit | 从父元素继承该属性。请参阅 inherit 。 |
technical details
Defaults: | 100% |
---|---|
return value: | String representing the border-image-slice attribute of the element. |
CSS version | CSS3 |
related articles
CSS Reference: border-Image-Slice property