私はちょうどいくつかの点を順序付きリストと結びつけようとしていますが、それを動作させることはできません。私は、アクティブなクラスに応じてセグメントをオンにしたいと思います。さらに、この画像のようなセグメントの間に生徒の名前を追加します。CSS3の順序付きリストでドットを接続する
次に、クラスをアクティブにして他のセグメントをオンに切り替えることができます。
これは私がやろうとしていることです。
UPDATE
私はli要素にアクティブ
UPDATE
をクラスを追加するのを忘れたので、私は、私は私のバイオリンを表示するために再び更新私のバイオリンを更新私はその人の名前に行かなければならない。
ol.timetable li {
min-width: 25%;
}
.timetable {
width: 100%;
list-style: none;
list-style-image: none;
margin: 20px 0 20px 0;
padding: 0;
}
.timetable li {
float: left;
text-align: center;
position: relative;
}
.timetable .date {
display: block;
vertical-align: bottom;
text-align: center;
margin-bottom: 1em;
color: #2B2B2B;
}
.timetable .dot {
color: black;
border: 3px solid #B2B2B2;
background-color: #B2B2B2;
border-radius: 50%;
line-height: 1.2;
width: 1.2em;
height: 1.2em;
display: inline-block;
z-index: 2;
}
.timetable .active .date,
.timetable .active .dot span {
color: black;
}
.timetable .dot:before {
content: "";
display: block;
background-color: #B2B2B2;
height: 0.4em;
width: 50%;
position: absolute;
bottom: 0.9em;
left: 0;
z-index: 1;
}
.timetable .dot:after {
content: "";
display: block;
background-color: #B2B2B2;
height: 0.4em;
width: 50%;
position: absolute;
bottom: 0.9em;
right: 0;
z-index: 1;
}
.timetable li:first-child .dot:before {
display: none;
}
.timetable li:first-child .dot:after .active {
border: 3px solid #F26227 !important;
background-color: #F26227 !important;
}
.timetable li:last-of-type .dot:after {
display: none;
}
.timetable .active .dot {
border: 3px solid #F26227;
background-color: #F26227;
}
.timetable .active .dot:before,
.timetable .active .dot:before {
background-color: #F26227;
}
<ol class='timetable'>
<li class="active">
<span class='date'>5/26/2017</span>
<span class='active dot'>
<span>
</span>
</span>
</li>
<li class="active">
<span class='date'>5/29/2017</span>
<span class='active dot'>
<span></span>
</span>
</li>
<li>
<span class='date'>6/5/2017</span>
<span class='dot'>
<span></span>
</span>
</li>
</ol>
あなたのHTMLに学生の名前を入れようと計画していますか?あなたは問題の一部を表示する名前を解決する(少なくとも試みる)ようにコードを更新できますか? – Serlite
さらに詳しくお知りになりたい場合は、各セグメントの下にラベルが貼られていますか? 3つのドットがすべてアクティブな場合、ラベルはどこにありますか? – Serlite
私の質問が更新されました。各セグメントのラベル。しかし、ラベルは正確なセグメントに動的に追加されます。したがって、1つのセグメントでは、右側の他のケースでは左側に表示されます。事は整列です。 –