css 中的进度条 inside modal bootstrap z-index 问题

progressbar in css inside modal bootstrap z-index issue

我的进度条写在 css 中,第一个和第二个圆圈之间的线略微悬停在数字“2”上。圆圈之间的线是假的。

这是我使用的样式:

/* progressbar */
.progressbar {
  width: 100%;
  counter-reset: step;
  margin-top: 7px;
  padding: 0;
}

.progressbar li {
  list-style-type: none;
  float: left;
  width: 100px;
  position: relative;
  text-align: center;
  font-family: sans-serif;
  font-size: 15px;
  font-weight: normal;
  color: #546A79;
  /* Steps*/
}

.progressbar li:before {
  content: counter(step);
  counter-increment: step;
  width: 44px;
  height: 44px;
  line-height: 44px;
  /* border: 4px solid #fff; */
  display: block;
  text-align: center;
  margin: 0 auto 13px auto;
  border-radius: 50%;
  background-color: #E3E3E3;

  /* Circles*/
}

.progressbar li:after {
  content: '';
  position: absolute;
  width: 100%;
  height: 4px;
  background-color: #E3E3E3;
  /*lines */
  top: 20px;
  left: -50%;
  z-index: 0;
}

.progressbar li:first-child:after {
  content: none;
}

.progressbar li.active {
  color: #546A79;
}

.progressbar li.active:before {
  width: 48px;
  height: 48px;
  line-height: 48px;
  border-radius: 50%;
  border-color: #0073CF;
  color: black;
  background-color: #ffda47;
  margin: 0 auto 9px auto;

}

.progressbar li.active + li.active:after {
  background-color: #ffda47;
}

这是问题的 jsfiddle:

http://jsfiddle.net/1aeur58f/523/

对于“.progressbar li:after”现在它的 z-index:-1;使这个 z-index:-1; 和 z-index:1;对于“.progressbar li”你的 ul 项目。

.progressbar li {
  list-style-type: none;
  float: left;
  width: 100px;
  position: relative;
  text-align: center;
  font-family: sans-serif;
  font-size: 15px;
  font-weight: normal;
  color: #546A79;
  z-index:1;
}


.progressbar li:after {
  content: '';
  position: absolute;
  width: 100%;
  height: 4px;
  background-color: #E3E3E3;
  /*lines */
  top: 20px;
  left: -50%;
  /*z-index: 0;*/
  z-index: -1;
}