下面它的外觀:居中圈CSS(圈數由AngularJS處理)
下面我想什麼有:
,或者getNumber返回更多例如
(so basicaly the circle始終對準中心的任何數字我getNumber回報)
下面的AngularJS代碼:
<div class="w3-container">
<span ng-repeat="i in getNumber(data.numberOfState) track by $index" style="margin-right:10%;">
<div id="advanced" class="circle" ></div>
</span>
<div id="barre"></div>
</div>
下面的CSS代碼:
.circle {
border-radius: 50%;
width: 18px;
height: 18px;
background: RoyalBlue;
display: inline-block;
}
#barre{
width: 100%;
height: 3px;
background: RoyalBlue;
margin-top: -17px;
}
#advanced {
width: 18px;
height: 18px;
/* TODO */
}
.circleActive {
border-radius: 40%;
width: 15px;
height: 15px;
background: RoyalBlue;
display: inline-block;
}
如何對齊中心欄上的圈?
right: 50%;
left: 50%;
position: absolute;
有了這個它的工作原理,但因爲我的圈子是由我的JavaScript重複出現在同一協調的展示,所以我能看到的只有一個。
謝謝馬爾欽,我確信我以前試過,但沒關係,它的工作原理! – xif