如何在纯css3中实现两个崩溃的圆圈?

时间:2016-07-09 07:09:51

标签: html css3 frontend figures

我需要做的是在下面的图片上:

enter image description here

我根本不想使用SVG。我认为这是两个边界半径为50%的div。但是我如何像在图像上合并它们一样?你能解决这个问题或提出建议吗?

1 个答案:

答案 0 :(得分:3)

这是一种最简单的方法,可能是您可以根据需要改进它

#main {
  width: 80px;
  border-radius: 50%;
  height: 80px;
  border: 3px solid blue;
}

#background {
  background: grey;
  border-radius: 50%;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
}

#small {
  background: grey;
  width: 30px;
  border-radius: 50%;
  height: 30px;
  border: 3px solid blue;
  margin-top: -30px;
  margin-left: 50px;
}
<div id="main">
  <div id="background"></div>
</div>
<div id="small"></div>