vue+element-ui修改el-steps默认样式

25 篇文章 0 订阅

ElementUI steps默认样式:
在这里插入图片描述
实线修改为虚线圆点在这里插入图片描述
只需修改el-step__line

/deep/.el-step__line{
  background: transparent;
  border-top: 5px dotted;
  .el-step__line-inner{
    border-width: 0 !important;
  }
}
拓展:

在这里插入图片描述
实现代码:其中绿色的Badge 标记可由step中的description来实现,通过修改.el-step__description类来修改样式
代码中的icon是我项目中用到的,复制代码的话要把icon的class类名替换成自己的。

<div class="stepOne">
      <el-steps :active="2" align-center>
        <el-step title="Submitted" icon="iconfont icon-submitted" description="1"></el-step>
        <el-step title="In Review" icon="iconfont icon-InReview" description="2"></el-step>
        <el-step title="Verified" icon="iconfont icon-verified" description="3"></el-step>
        <el-step title="Verified" icon="iconfont icon-Denied" description="4"></el-step>
      </el-steps>
</div>
.stepOne{
      padding-top: 30px;
      background: #f6f6f6;
      /deep/.el-step__icon{
        background: #f6f6f6;
      }
      /deep/.el-step__icon-inner{
        font-size: 36px;
      }
      /deep/.el-step__line{
        background: transparent;
        border-top: 5px dotted;
        .el-step__line-inner{
          border-width: 0 !important;
        }
      }
      /deep/.el-step{
        position: relative;
        .el-step__head.is-process {
          color: #C0C4CC;
          border-color: #C0C4CC;
        }
        .el-step__title.is-process{
          color: #C0C4CC;
          font-weight: unset;
        }
        .el-step__description{
          position: absolute;
          top: -16px;
          left: 49%;
          width: 20px;
          height: 16px;
          line-height: 16px;
          padding: 0;
          text-align: center;
          border-radius: 8px;
          background: #999;
          color: #fff;
        }
        .el-step__description.is-finish{
          background: #36BE1BFF;
        }
      }
    }
  • 2
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值