美文网首页
分步实现

分步实现

作者: SevenLonely | 来源:发表于2018-04-19 10:22 被阅读0次
    <ul class="progressbar">
          <li class="active" style="width: 25%;">步骤1</li>
          <li class="active" style="width: 25%;">步骤2</li>
          <li class="" style="width: 25%;">步骤3</li>
          <li class="" style="width: 25%;">步骤4</li>
        </ul>
    
    .progressbar {
        font-family: montserrat, arial, verdana;
        margin: 15px;
        padding: 0;
        text-align: center;
        margin-bottom: 30px;
        overflow: hidden;
        counter-reset: step;
        z-index: 99;
      }
      .progressbar li {
        list-style-type: none;
        font-size: 9px;
        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: #ebebeb;
        border-radius: 20px;
        margin: 0 auto 5px auto;
      }
      .progressbar li:after {
        content: '';
        width: calc(100% - 20px);
        height: 2px;
        background: #ebebeb;
        position: absolute;
        left: calc((-100% + 20px) / 2);
        top: 9px;
      }
      .progressbar li:first-child:after {
        content: none;
      }
      .progressbar li.active:before,
      .progressbar li.active:after {
        background: #a56428;
        color: white;
      }
    

    相关文章

      网友评论

          本文标题:分步实现

          本文链接:https://www.haomeiwen.com/subject/ktnikftx.html