gpt4 book ai didi

html - 纯css3如何实现两个折叠圆圈?

转载 作者:行者123 更新时间:2023-11-28 16:07:24 24 4
gpt4 key购买 nike

我需要做的是在下图中:

enter image description here

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

最佳答案

这是最简单的方法,也许你可以根据自己的需要改进它

#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>

关于html - 纯css3如何实现两个折叠圆圈?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38279336/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com