CSS | border-image-source Property
The border-image-source property is used to specify the image source which is to be set as the border of an element.
Syntax:
border-image-source: url(image-path.png)| none| initial| inherit;
Note: If the value is none, the border styles will be used. The specified image can be divided into regions with the help of border-image-slice property.
Values:
- none: No image is specified.
- image: Used to specify the path of the image to be used as the border of an element.
- initial: Initializes the property with it’s default value.
- inherit: It takes the value from the parent element.
Example:
<!DOCTYPE html> <html> <head> <style> body { text-align:center; color:green; } .border1 { border: 10px solid transparent; padding: 15px; border-image-source: url( border-image-repeat: round; border-image-slice: 50; border-image-width: 20px; } </style> </head> <body> <h1>GeeksforGeeks</h1> <h2>border-image-source property</h2> <div class = "border1">GEEKSFORGEEKS</div> </body> </html> |
Output:

Browser Support:
- Chrome 15.0
- Edge 11.0
- Firefox 15.0
- Safari 6.0
- Opera 15.0
Recommended Posts:
- HTML | DOM Style borderImageSource Property
- CSS | transition-property Property
- CSS | right Property
- CSS | all Property
- CSS | top Property
- CSS | max-width Property
- CSS | column-gap Property
- CSS | visibility Property
- CSS | tab-size Property
- CSS | flex Property
- CSS | columns Property
- CSS | box-sizing Property
- CSS | margin-right Property
- CSS | min-height Property
- CSS | padding-top Property
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



