Specify an image as the border around a div element:
The borderImage property is a shorthand property for setting the borderImageSource, borderImageSlice, borderImageWidth, borderImageOutset and borderImageRepeat properties.
Omitted values are set to their default values.
The borderImage property is supported in Internet Explorer 11, Firefox, Opera 15, Chrome, and Safari 6.
Safari 5 supports an alternative, the webkitBorderImage property.
Return the borderImage property:
Set the borderImage property:
Value | Description |
---|---|
borderImageSource | The path to the image to be used as a border |
borderImageSlice | The inward offsets of the image-border |
borderImageWidth | The widths of the image-border |
borderImageOutset | The amount by which the border image area extends beyond the border box |
borderImageRepeat | Whether the image-border should be repeated, rounded or stretched |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Default Value: | none 100% 1 0 stretch |
---|---|
Return Value: | A String, representing the border-image property of an element |
CSS Version | CSS3 |
CSS reference: border-image property