I am trying to add lines between my circles, I've added ::after
to css, but it only shows the line for the first circle, why it doesn't apply for every circle?
.segments > .item {
display: flex;
}
.circle::after {
content: '';
background: grey;
height: 5px;
width: 50px;
position: absolute;
left: 0;
top: 20px;
z-index: -1;
}
.circle {
width: 36px;
height: 36px;
border-radius: 50%;
cursor: pointer;
background: red;
display: grid;
place-items: center;
margin: 20px;
}
<div class="segments">
<div class="item">
<div class="circle">
test
</div>
<div class="circle">
test
</div>
<div class="circle">
test
</div>
<div class="circle">
test
</div>
</div></div>