JSFiddle - React, Tailwind, and code Playground
by 규연 황
HTML
<ol class="step">
<li class="">
step01
</li>
<li class="">
step02
</li>
<li class="current">
step03
</li>
</ol>
CSS
.step {
position: relative;
overflow: hidden;
padding: 20px;
}
.step:before {
content: '';
position: absolute;
top: 10px;
right: 0;
left: 0;
border-top: 2px solid red;
}
.step li {
position: relative;
float: left;
width: 33%;
}
.step li:after{
content: '';
position: absolute;
top: -15px;
left: 0;
width: 10px;
height: 10px;
border: 2px solid red;
border-radius: 50%;
background: #fff;
}
.step li.current ~ li:after{
border-color: #000;
}
.step li.current:before {
content: '';
position: absolute;
top: -10px;
left: 0;
width: 1000px;
border-top: 2px solid #000;
}
.step li.current:before