Style borderImage property
Example
Specify an image to be used as the border around a div element:
document.getElementById("myDIV").style.borderImage="url(border.png) 30 30 round";
Try it »
Definition and Usage
The borderImage property is a shorthand property for setting the borderImageSource, borderImageSlice, borderImageWidth, borderImageOutset and borderImageRepeat following properties.
Omitted values are set to their default values.
Browser support

Internet Explorer 11, Firefox, Opera 15, Chrome, and Safari 6 support the borderImage property.
Safari 5 supports an alternative property, namely the webkitBorderImage property.
Syntax
Return the borderImage property:
object
.style.borderImage
Set the borderImage property:
object
.style.borderImage="
source slice width outset repeat
|initial|inherit"
Attribute values
| Value | Description |
|---|---|
| borderImageSource | The path to the image to be used for drawing the border. |
| borderImageSlice | The inward offset of the image border. |
| borderImageWidth | The width of the image border. |
| borderImageOutset | The amount by which the border image area extends beyond the border box. |
| borderImageRepeat | Specifies whether the image border is repeated (tiled) or stretched. |
| initial | Sets this property to its default value. See initial. |
| inherit | Inherits this property from its parent element. See inherit. |
Technical Details
| Default value: | none 100% 1 0 stretch |
|---|---|
| Return Value: | A string representing the element's border-image property. |
| CSS version | CSS3 |
Related Articles
CSS Reference Manual:The border-image property
The Style object