HTML
<div id="status-buttons" class="text-center">
<a href="/1"><span>1</span></a>
<a href="/2"><span>2</span></a>
<a href="/3"><span>3</span></a>
</div>
CSS
#status-buttons a {
display:inline-block;
font-size: 22px;
margin-right: 20px; }
#status-buttons a span {
color: white;
line-height: 60px;
padding-top: 5px;
}
#status-buttons a.active span {
background: #00BC8C; }
.circle, #status-buttons a {
width: 56px;
height: 56px;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
-ms-border-radius: 50%;
border-radius: 50%;
background: #5dc5c5;
margin-right: 10px;
text-align:center;
}
尝试了圈子。就像在图像中一样,我被圈子之间的线条所困。尝试添加border-bottom,它不会出现。不认为div中的宽度对行有用吗?有没有办法解决这个问题,所以当点击圈子上的不同链接时,圈数及其行将有活动类?
另一个问题:据说,链接将我们带到不同形式的不同页面,是否可以使圈子活跃?只有我能想到的方法是在每个页面中激活圆圈,所以如果点击任何链接页面,例如,单击#2,它将显示1和2个圆圈处于活动状态。这可能是一个骗子。还有另一种更好的方法吗?
帮助表示赞赏。
答案 0 :(得分:1)
我最近做了类似的事。
.progressbar {
margin-top: 40px;
margin-bottom: 30px;
overflow: hidden;
counter-reset: step;
}
.progressbar li {
list-style-type: none;
color: #555555;
text-transform: uppercase;
text-align: center;
font-size: 9px;
width: 20%;
float: left;
position: relative;
}
.progressbar li:before {
content: counter(step);
counter-increment: step;
width: 20px;
line-height: 20px;
display: block;
font-size: 10px;
color: #333;
background: #bfbfbf;
border-radius: 20px;
margin: 0 auto 5px auto;
}
.progressbar li:after {
content: '';
width: 100%;
height: 2px;
background: #bfbfbf;
position: absolute;
left: -50%;
top: 9px;
margin-left: 5px;
z-index: -1;
}
.progressbar li:first-child:after {
content: none;
}
.progressbar li.stepped {
color: #900028;
font-weight: bold;
}
.progressbar li.stepped:before,
.progressbar li.stepped:after{
background: #900028;
color: white;
}
&#13;
<ul class="progressbar">
<li class="stepped">Step 1</li>
<li class="stepped">Step 2</li>
<li class="stepped">Step 3</li>
<li>Step 4</li>
<li>Step 5</li>
</ul>
&#13;
(信用:http://thecodeplayer.com/walkthrough/jquery-multi-step-form-with-progress-bar)