css实现步骤条

实现效果

1160762-20180917193520689-1898765846.png

html

<ul class="steps">
              <li class="active">申请完成</li>
              <li class="active">资料上传</li>
              <li>专员审核</li>
              <li>理赔结案</li>
            </ul>

css

/* 进度条 */
/* 创建步骤数字计数器 */
.steps {
    position: relative;
    margin-bottom: 30px;
    counter-reset: step; 
    background:#fff;
    margin :5px 0;
    overflow: hidden;
    margin-left: -46px;
}

/* 步骤描述 */
.steps li {
    list-style-type: none;
    font-size: 14px;
    text-align: center;
    width: 20%;
    position: relative;
    float: left;
    height:40px;
    line-height :40px;
    padding :10px 0;
}
/* 步骤数字 */
.steps li:before {
    display: block;
    content: counter(step); /* 设定计数器内容 */
    counter-increment: step; /* 计数器值递增 */
    width: 10px;
    height: 10px;
    background-color:#ccc;
    line-height: 10px;
    border-radius: 10px;
    font-size: 0;
    color: #fff;
    text-align: center;
    font-weight: 600;
    margin: 0 auto 9px auto;
}

/* 连接线 */
.steps li ~ li:after {
    content: '';
    width: 100%;
    height: 3px;
    background-color:#ccc;
    position: absolute;
    left: -48%;
    top: 14px;
    z-index: 0; 
}
/* 将当前/完成步骤之前的数字及连接线变绿 */
.steps li.active:before, .steps li.active:after {
    background-color:#6fb1bd;
}

转载于:https://www.cnblogs.com/lml-lml/p/9664376.html

  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值