【发布时间】:2021-01-14 08:00:15
【问题描述】:
我正在尝试使用剪辑路径从我的 div(蓝色部分)中剪下一个弯曲的形状,但我猜剪辑路径圆圈没有那个选项。我想使用剪辑路径,因为默认情况下它会响应;而不是:after 因为它会在小屏幕上搞乱一切。这是我想要实现的照片:
这是代码:
.bg-overlay {
width: 76%;
min-height: 100vh;
background-color: darkblue;
position: absolute;
top: 0;
left: 0;
clip-path: circle(90% at 50px 23px);
}
.wrapper {
width: calc(100% - 40px);
height: calc(100vh - 40px);
margin: 20px;
background: cyan;
z-index: 0;
}
<div class="bg-overlay"></div>
<div class="wrapper"></div>
【问题讨论】: