Style borderImageSourceProperty
Examples
Use an image as the border around a div element:
document.getElementById("myDIV").style.borderImageSource="url(border.png)";
Try it Yourself »
Definition and Usage
The borderImageSource property sets or returns the image to be used instead of the border style given by the border-style property.
Tip:If the value is "none", or if the image cannot be displayed, the border style is used.
Browser Support
![]()
Opera does not support the borderImageSource property.
Internet Explorer 10 and earlier versions do not support the borderImageSource property.
Safari 5 and earlier versions do not support the borderImageSource property.
See alsoborderImageproperty instead!
Syntax
Return the borderImageSource property:
object.style.borderImageSource
Set the borderImageSource property:
object.style.borderImageSource="none|image|initial|inherit"
Property Values
| Value | Description |
|---|---|
| none | No image is used. |
| image | The path to the image to be used for drawing the border. |
| initial | Sets the property to its default value. Seeinitial。 |
| inherit | Inherits the property from its parent element. Seeinherit。 |
Technical Details
| Default value: | none |
|---|---|
| Return value: | A string representing the border-image-source property of an element. |
| CSS Version | CSS3 |
Related Articles
CSS Reference:The border-image-source property
Other Extensions
Style Object