I need to make an effect using HTML and CSS only with a circle image surrounding another image.
Here is what I'm trying to achieve:
On this example, the circle is an SVG image. The center image is a PNG with a border-radius.
I think the best way would be to use the top half of the main image as a mask for the circle image. I looked for the mask and the clip-path properties, but without success.
Here is my code so far:
<div class="main-image">
<div class="image-container">
<img src="uploads/main_image.png">
</div>
<div class="outline-circle"></div>
</div>
.image-container {
position: relative;
border-radius: 9999px;
overflow: hidden;
img {
width: 30vw;
max-width: 500px;
}
}
.outline-circle {
position: absolute;
top: 0;
left: 0;
background-image: url(../img/circle_1.svg);
height: 100%;
width: 600px;
background-size: contain;
background-repeat: no-repeat;
background-position: center;
}
But with this code, the circle is simply positioned on top of the image:
Thanks for your help,

