HTML DOM Style borderImage property
Examples
Designated as a border around the image div element:
document.getElementById("myDIV").style.borderImage="url(border.png) 30 30 round";
try it"
Definition and Usage
borderImage property is set borderImageSource , borderImageSlice , borderImageWidth , borderImageOutset and borderImageRepeat properties shorthand property.
Omitted values are set to their default values.
Browser Support
Internet Explorer 11, Firefox, Opera 15, Chrome and Safari 6 support borderImage property.
Safari 5 supports another alternative of the property attribute that webkitBorderImage property.
grammar
Back borderImage properties:
object .style.borderImage
Setting borderImage properties:
object .style.borderImage="source slice width outset repeat|initial|inherit"
Property Value
值 | 描述 |
---|---|
borderImageSource | 要用于绘制边框的图像的路径。 |
borderImageSlice | 图像边框的向内偏移。 |
borderImageWidth | 图像边框的宽度。 |
borderImageOutset | 边框图像区域超出边界框的量。 |
borderImageRepeat | 规定图像边框是重复拼接图块还是延伸图块。 |
initial | 设置该属性为它的默认值。请参阅 initial 。 |
inherit | 从父元素继承该属性。请参阅 inherit 。 |
technical details
Defaults: | none 100% 1 0 stretch |
---|---|
return value: | String representing the border-image property element. |
CSS version | CSS3 |
related articles
CSS Reference: border-Image property