how to create css concave/convex shapes

邮差的信 提交于 2019-12-05 06:00:54

I have used 2 div's with box-shadow i have added border for understanding

body {
  background:url(https://placeimg.com/640/480/any);
}

.out {
  width: 455px;
  height: 275px;
  border: 1px solid red;
  position: relative;
  overflow: hidden;
  margin: 20px;
}

.in {
  width: 550px;
  height: 550px;
  border: 1px solid green;
  position: absolute;
  left: 200px;
  border-radius: 50%;
  box-shadow: 0 0 0 500px white; /* this is the white background */
}

.bottom .in {
  bottom: 0;
  left: 200px;
}
<div class="out">
  <div class="in">

  </div>
</div>

<div class="out bottom">
  <div class="in">

  </div>
</div>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!