「接続されたドット」スタイルを取得するのにはいくつかの困難がありますが、私はHTMLとCSSで作成されたプログレスバーを作成しようとしています。進捗バーCSSとHTMLのみ
これは、次の要素に基づいているためです。どのようにして円の後ろに置くことができますか?
理想的には、ドット1 2 3を接続し、3ここでは4
https://jsfiddle.net/bzjs1h9r/1/
<section class="steps">
<ul class="checkout">
<li class="current">
<div class="index">...</div>
<div class="caption">Email</div>
</li>
<li class="inactive">
<div class="index">2</div>
<div class="caption">Your Info</div>
</li>
<li class="inactive">
<div class="index">3</div>
<div class="caption">Delivery</div>
</li>
<li class="inactive">
<div class="index">4</div>
<div class="caption">Review</div>
</li>
</ul>
.steps {
.checkout {
display: table;
table-layout: fixed;
width: 100%;
li {
display: table-cell;
padding-left: 0;
text-align: center;
&:before {
margin: 0 auto;
display: block;
width: 30px;
height: 30px;
content: "";
text-align: center;
float: none;
position: relative;
top: 30px;
border-radius: 100%;
border: 2px solid #79b93e;
}
&:after {
content: "";
border: 1px solid rgba(135, 135, 135, 0.2);
width: 100%;
webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg);
-o-transform: rotate(90deg);
-ms-transform: rotate(90deg);
transform: rotate(180deg);
display: block;
position: absolute;
top: 60px;
right: -53px;
}
&:last-child {
&:after {
display: none;
}
}
.caption {
text-transform: uppercase;
margin-top: 5px;
font-weight: 900;
}
}
}
.container-fluid {
max-width: 550px;
overflow:hidden;
}
}
とフィドルは、あなたが "円の背後にある" によって何を意味するか説明できますか?ありますか – Dekel
質問を詳しく説明できますか?なぜ "z-index"プロパティを使用できないのですか? – Arjun