Home  >  Q&A  >  body text

Create a circular border around an image using the CSS Clip-path:circle() property

I want to know how to add a border to an image clip-path:circle(); Is there any other way to add a border?

Like: Border: 5px solid red;

I tried this:

.roundedimage {
  width: 200px;
  clip-path: circle();
}
<img src="images/tv.jpg" alt="rounded Image" class="roundedimage">

Since border-radius does not work, how to proceed next

P粉875565683P粉875565683184 days ago420

reply all(1)I'll reply

  • P粉579008412

    P粉5790084122024-04-01 11:46:30

    border-radius Applies to images. See example below. Are you looking for something else?

    .roundedimage {
      width: 200px;
      border: 5px solid red;
      border-radius:100vh;
    }
    rounded Image

    reply
    0
  • Cancelreply