<section>
<div>
<h4>ellipse(50% 25%)</h4>
<div class="box ellipse1"></div>
</div>
<div>
<h4>ellipse(125px 100px at 50% 80%)</h4>
<div class="box ellipse2"></div>
</div>
</section>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
section {
padding: 2vw;
display: flex;
gap: 2vw;
flex-wrap: wrap;
justify-content: center;
}
section > div {
background-color: #eeeeee;
position: relative;
margin-top: 20px;
}
.box {
width: 300px;
height: 300px;
background-image: url('https://fruntend.com/storage/photos/1/sunflowers.jpg');
background-repeat: no-repeat;
}
.ellipse1 {
clip-path: ellipse(50% 25%);
}
.ellipse2 {
clip-path: ellipse(125px 100px at 50% 80%);
}
h4 {
font-family: sans-serif;
text-align: center;
margin-bottom: 1vw;
position: absolute;
bottom: 100%;
left: 0;
right: 0;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.