Style borderImageSource Property
Example
Use an image as the border around a div element:
document.getElementById("myDIV").style.borderImageSource = "url(border.png)";
Try it Yourself »
Description
The borderImageSource property sets or returns the image to be used, instead of the border styles given by the border-style properties.
Tip: If the value is "none", or if the image cannot be displayed, the border styles will be used.
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
Property | |||||
---|---|---|---|---|---|
borderImageSource | Yes | 11.0 | Yes | 6.0 | 15.0 |
Look at the borderImage property 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 will be used |
image | The path to the image to be used as a border |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Technical Details
Default Value: | none |
---|---|
Return Value: | A String, representing the border-image-source property of an element |
CSS Version | CSS3 |
Related Pages
CSS reference: border-image-source property
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.