CSS border images allow you to use an image as the border of an element. You can control how the image is sliced, repeated, and scaled to fit the borders.
This example uses the default settings for border images:
.border-image {
border: 10px solid transparent;
border-image: url('https://www.shariqsp.com/image1.jpg') 30 round;
}
Adjust the border image width to create a thinner border:
.border-image-thin {
border-image-width: 5px;
}
Adjust the border image width to create a thicker border:
.border-image-thick {
border-image-width: 20px;
}
Control how the image is repeated around the border:
.border-image-repeat {
border-image-repeat: repeat;
}
Adjust the slicing of the border image:
.border-image-slice {
border-image-slice: 50%;
}