CSS border-image Property
CSS border-image Property
CSS border-image
property draws an image in place of an element's border-style. It is a shorthand property of the following CSS properties.
Example
Syntax
Using CSS
Using Javascript
Animatable
No, border-image property is not animatable. CSS Animatable Properties Reference.
Default Value
Default value for CSS border-image property is none 100% 1 0 stretch.
Property Value
The following table provides a list of values for CSS border-image
property.
Value | Type | Explanation |
---|---|---|
border-image-source | Required | Specifies the path to the image to be used as a border. |
border-image-slice | Required | Specifies how to divide the border image. |
border-image-width | Optional | Specifies the width of the border image. |
border-image-outset | Optional | Specifies the amount by which the border image area extends beyond the border box. |
border-image-repeat | Required | Specifies how the edge regions of a source image are adjusted to fit the dimensions of an element's border image. |
Using JavaScript
In the following example, we will demonstrate how to set the CSS border-image
property of an element using JavaScript.
Example
Reminder
Hi Developers, we almost covered 98.7% of CSS Tutorials with examples for quick and easy learning.
We are working to cover every Single Concept in CSS.
Please do google search for:
Join Our Channel
Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.
This channel is primarily useful for Full Stack Web Developer.