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

标签 css progress-bar bootstrap-modal z-index

我的进度条是用 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 {
  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;
}

关于css - modal bootstrap z-index 问题中 css 中的进度条,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45268026/

相关文章:

android - 自定义进度可绘制有时不显示

winforms - 使用 ProgressBar 作为等待栏 - 如何避免卡住?

jquery - 旋转木马不工作..?

html - 如何让左侧栏的高度与右侧栏的高度相等?

jquery - 多次根据 url 更改元素 css 而无需重新加载页面(需要 AJAX)

javascript - 使用 JavaScript 在单个大图像的不同 "crops"之间切换

angular - 如何使用特定的注入(inject)器在 ng-bootstrap 模式中打开组件?

css - div底部透明(包括div的包含)

Android 不确定进度条没有动画

jquery - Bootstrap 3 Modal 显示为全白屏