TOP CATEGORIES

×

How can apply border property of an image in CSS?

V

Vandana Gawtam

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 Image

img {

   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;

}

0 votes

Your Answer

Email: advertise@gdatamart.com

Donate: To Support US

© 2024 GDATAMART.COM (All Rights Reserved)