html - CSS样式实现曲线圆
解决方案
注意:您可以通过使用 2 个 divabsolute positioning
与他们的父母作为relative positioned
工作代码:
.c-wrapper {
position: relative;
}
.red {
background: red;
width: 100%;
height: 100px;
border-bottom-left-radius: 200px;
border-bottom-right-radius: 200px;
position: absolute;
top: 0;
}
.red-1 {
background: red;
width: 200px;
height: 100px;
border-bottom-left-radius: 100px;
border-bottom-right-radius: 100px;
position: absolute;
top: 70px;
left: 50%;
transform: translateX(-50%);
}
<div class="c-wrapper">
<div class="red"></div>
<div class="red-1"></div>
</div>
推荐阅读
- swiftui - SwiftUI - 将数组传递给函数
- python - CUDA 初始化:CUDA 未知错误 - 这可能是由于环境设置不正确
- javascript - 带有 Math.pow 的 Js NaN 或未定义元素
- excel - 如何从 .txt 文件中获取文本并将其写入同一个 excel 文件的新工作表中
- reactjs - 如何成功部署带有firebase的react app?
- python - 根据 2 个不同的列删除熊猫中 Numpy 数组中的重复项
- python - 标量符号多重 sp.eye 的正确方法是什么
- c# - 无法使用 PKCS#11 接口对 USB 令牌执行解密
- flutter - 如何将 StatefulWidget 绑定到模型而不在 StatefulWidget 之外完成?
- minecraft - 我在 google vps 上创建的 mc 服务器出现问题