我想用CSS弯曲这个矩形div/背景的底边,所以结果是这样的:
有人知道如何实现它吗?
.curved { margin: 0 auto; height: 400px; background: lightblue; border-radius:0 0 200px 200px; }
<div class="container"> <div class="curved"></div> </div>
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
检查一下。我用 :after 伪元素创建了这个。如果背景是纯色的话会很有帮助。
只需使用
border-radius
并依赖一些溢出。您还可以考虑伪元素以避免额外的标记: