Curl bottom of div to inside using CSS
P粉617237727
2023-08-24 21:15:13
<p>I want to bend the bottom edge of this rectangular div/background using CSS, so the result is like this: </p>
<p>
Does anyone know how to implement it? </p>
<p>
<pre class="brush:css;toolbar:false;">.curved {
margin: 0 auto;
height: 400px;
background: lightblue;
border-radius:0 0 200px 200px;
}</pre>
<pre class="brush:html;toolbar:false;"><div class="container">
<div class="curved"></div>
</div></pre>
</p>
check. I created this using :after pseudo-element. It helps if the background is a solid color.
Just use
border-radius
and rely on some overflow. You can also consider pseudo-elements to avoid extra markup: