How To Set Border Radius In Image

We are going to see how to set the border radius in the image,

If you want how to add a border radius for the gradient border so please review this blog.

https://www.thecodehubs.com/how-to-add-border-radius-for-the-gradient-border/

First of all, Create HTML in the index.html file.

<body>
    <div class="background-radius-image">
    </div>
<body>

If you want to set the border radius in the image, you need to take the image in the background of the div.

Now you add CSS in <style>…</style> tag in index.html file.

<style>
  .background-radius-image{
    border-style: solid;
    border-radius: 50%;
    height: 510px;
    width: 510px;
    border-width: 10px;
    border-color: #5aabdd;
    background-size: cover;
    background-position: 50%;
    background-repeat: no-repeat;
    background-image: url('thecodehubs.jpg');
  }
</style>

Now my border radius image is set.

Review the below image.

I hope you guys found something useful  ??

Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe

Select Categories