X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR BOOTSTRAP XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

Style borderImageSource Property

Style Object Reference Style Object

Example

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 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

Internet Explorer Firefox Opera Google Chrome Safari

The borderImageSource property is not supported in Opera.

The borderImageSource property is not supported in Internet Explorer 10 and earlier.

The borderImageSource property is not supported in Safari 5 and earlier.

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


Style Object Reference Style Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook