我想繪製一個空圓圈之間的水平線(無背景),如何從一個圓圈繪製一條直線與其他圓圈完全匹配而不需要輸入另一個圓圈或不能達到它?帶透明背景的圓圈之間的水平線
我沒有使用codepen
#wizard {
background-color: #eee;
display: inline-block;
padding: 15px;
}
#wizard .step {
display: inline-block;
width: 40px;
height: 40px;
background-color: transparent;
border: 1px solid #000;
border-radius: 50%;
text-align: center;
padding: 2px;
margin-right: 3em;
margin-left: 3em;
position: relative;
}
#wizard .step:after {
content: "";
display: block;
height: 1px;
background-color: #000;
position: absolute;
left: auto;
right: -100%;
width: 100%;
top: 50%;
}
#wizard .step:last-child:after {
display: none;
}
#wizard .step span {
padding: 11px;
display: block;
}
<div id="wizard">
<div class="step active">
<span>1</span>
</div>
<div class="step">
<span>2</span>
</div>
<div class="step">
<span>3</span>
</div>
</div>
爲什麼你就不能使用'離開:100%',而不是作爲一個數學忍者? – Ricky
哈。公平的問題。習慣的力量,我猜 - 我很少使用'%'做任何事情。 – Rounin
我孤立了這個問題,這是由於一些空白,你可以選擇從一個移動鼠標到三個。 [的jsfiddle](https://jsfiddle.net/rickyruizm/0bh5401w/)。 – Ricky