Three basic border property attributes are required to show the border of an image element:
- size of the border like 1px, 5px, 10px, etc.
- border show like solid, dotted, double, etc.
- color of the border like red, blue, #f9f9f9, etc.
CSS Border Property Syntax of An Imageimg {
border: 10px solid #808080;
}
<img src="pass_image_url" />
Use image as the border around an image element
We can use an image as the border around an image element by using the border-image property allows you to specify an image to be used as the border around an element:
#border_img {
border-image: url(image_url) 30 round;
}