Here is the final effect.
I tried it, but I don’t know how to proceed.
I hope to get some hints to help me to proceed.
I have now added some code to make it look more like it. But it still looks a little imperfect.
Can you see the result below.
I spent a lot of divs to combine them, but the rounded corners do not look very smooth
.block {
position: relative;
}
.block-shapes {
position: relative;
display: flex;
}
.block-shape {
position: absolute;
height: 30px;
width: 50%;
top: 0;
}
.block-shape__left {
left: 0;
border-radius: 40px 40px 0 0 / 30px 30px 0 0;
background-color: #eee;
}
.block-shape__right {
right: 0;
margin-top: 30px;
border-radius: 0 0 40px 40px / 0 0 30px 30px;
background-color: #fff;
}
.block-fills {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
}
.block-fill {
position: absolute;
top: 0;
box-sizing: border-box;
}
.block-fill__left {
left: 0;
width: 50%;
height: 90px;
background-color: #eee;
border-radius: 40px 40px 0 0 / 30px 30px 0 0;
}
.block-fill__right {
right: 0;
margin-top: 30px;
width: 50%;
height: 60px;
background: linear-gradient(to right, #eee, #fff);
border-radius: 0 40px 0 0 / 0 30px 0 0;
}
.block-content {
position: relative;
z-index: 3;
height: 300px;
background-color: #eee;
margin-top: 60px;
border-radius: 0 30px 30px 30px;
}
<div class="block">
<div class="block-fills">
<div class="block-fill block-fill__left"></div>
<div class="block-fill block-fill__right"></div>
</div>
<div class="block-shapes">
<div class="block-shape block-shape__left"></div>
<div class="block-shape block-shape__right"></div>
</div>
<div class="block-content"></div>
</div>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…