我们可以创建带有css和html内部切割的透明圆圈吗? 我附上了图片以便澄清
.circle {
width: 150px;
height: 150px;
border-radius: 50%;
border: 1px solid black;
}

<div class="circle"></div>
&#13;
答案 0 :(得分:3)
您可以使用:after
伪元素
.circle {
width: 150px;
height: 150px;
border-top: 2px solid black;
border-left: 2px solid black;
border-right: 2px solid black;
border-bottom: 2px solid transparent;
border-radius: 50%;
position: relative;
transform: rotate(30deg);
}
.circle:after {
content: '';
position: absolute;
bottom: 0;
border-radius: 50%;
height: 10px;
width: 40px;
left: 50%;
transform: translate(-50%, 7%);
border-bottom: 2px solid black;
border-top: 2px solid transparent;
border-left: 2px solid transparent;
border-right: 2px solid transparent;
}
&#13;
<div class="circle"></div>
&#13;
答案 1 :(得分:2)
SVG可能是一种选择。
看到这个优秀的Answer
svg {
height: 100px;
width: 100px;
}
circle {
fill: transparent;
stroke: green;
stroke-width: 3;
}
.dashed {
stroke-dasharray: 75, 10;
}
div {
height: 100px;
width: 100px;
color: green;
font-weight: bold;
text-align: center;
line-height: 100px;
}
&#13;
<svg viewBox="0 0 120 120">
<circle cx="55" cy="55" r="50" class="dashed" />
</svg>
&#13;