Style borderImage attribute

Definition and Usage

borderImage This attribute is a shorthand attribute for setting the following properties:

Omitted values are set to their default values.

See also:

CSS Reference Manual:border-image property

Example

Specify the image as the border of the <div> element:

document.getElementById("myDIV").style.borderImage = "url(border.png) 30 30 round";

Try It Yourself

Syntax

Return borderImage property:

object.style.borderImage

Set borderImage property:

object.style.borderImage = "source slice width outset repeat|initial|inherit"

Attribute Value

Value Description
borderImageSource The path of the image to be used as the border.
borderImageSlice The inward offset of the image border.
borderImageWidth The width of the image border.
borderImageOutset The amount that the border image area extends beyond the border box.
borderImageRepeat Should the image border be tiled (repeated), filled (rounded), or stretched (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 that represents the element's border-image property.
CSS Version: CSS3

Browser Support

Table numbers indicate the first browser version that fully supports this attribute.

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
16.0 11.0 15.0 6.0 15.0