Utilizor
Contact Us

CSS Border Images

The CSS border-image property allows you to specify an image to be used instead of the normal border around an element.

CSS Border Images

The border-image property allows you to specify an image to be used instead of the normal border around an element.

The property has three parts:

  1. The image to use as the border
  2. Where to slice the image
  3. Define whether the middle sections should be repeated or stretched

Example 1: Border Image Repeat

The border-image property specifies an image to be used as the border around an element.

Example 2: Border Image Stretch

Here, the image is stretched to fill the area.

Example

#borderimg { 
  border: 10px solid transparent;
  padding: 15px;
  border-image: url(border.png) 30 round;
}