当前位置: 首页 > news >正文

【uniapp】自定义步骤条样式

代码实现

<view class="steps-wrap"><view class="flex-box"><view class="number active-number">1</view><view class="desc active-desc">步骤1</view><view :class="['line', activeStep == 1 ? 'line1' : 'line3']"></view></view><view class="flex-box"><view :class="['number', activeStep == 1 ? '' : 'active-number']">2</view><view :class="['desc', activeStep != 1 ? 'active-desc' : '']">步骤2</view><view :class="['line', activeStep == 1 ? 'line2' : activeStep == 2 ? 'line1' : 'line3']"></view></view><view class="flex-box"><view :class="['number', activeStep == 3 ? 'active-number' : '']">3</view><view :class="['desc', activeStep == 3 ? 'active-desc' : '']">步骤3</view></view>
</view>
.steps-wrap {padding: 36rpx 0 0;display: flex;align-items: center;.flex-box {flex: 1;display: flex;flex-direction: column;align-items: center;position: relative;}.number {position: relative;z-index: 5;width: 40rpx;height: 40rpx;background: #9cccff;color: #fff;border-radius: 50%;display: inline-flex;align-items: center;justify-content: center;font-size: 24rpx;}.active-number {background: var(--recruit-color);}.desc {font-size: 24rpx;color: #c8c8c8;line-height: 34rpx;margin-top: 20rpx;font-weight: 500;text-align: center;}.active-desc {color: #484848;}.line {position: absolute;top: 18rpx;left: 50%;z-index: 1;width: 100%;height: 4rpx;}.line1 {background: linear-gradient(90deg, #3a9aff 0%, #9cccff 21%, #9cccff);}.line2 {background: #9cccff;}.line3 {background: var(--recruit-color);}
}
http://www.lryc.cn/news/301820.html

相关文章:

  • UE5 C++ UObject实例化
  • Appium环境安装与架构介绍
  • Vue+Vite项目初建(axios+Unocss+iconify)
  • ASUS华硕枪神8笔记本电脑G614JIR,G814JVR,G634JYR,G834JZR工厂模式出厂Windows11系统 带重置还原功能
  • Python入门:常用模块—xml模块
  • 蓝队应急响应工具箱v2024.1​
  • Linux中获取字符串长度与获取子字符串
  • Rust语言之sha-256爆破
  • Rust中的字符串处理及相关方法详解
  • NS安装-CentOS服务器安装Nightscout CGM
  • 利用ChatGPT提升工作效率
  • django admin页面美化
  • Git 操作以及Git 常见问题
  • 如何学习和规划类似ChatGPT这种人工智能(AI)相关技术
  • 4 月 9 日至 4 月 10 日,Hack.Summit() 2024 首聚香江
  • [力扣 Hot100]Day29 删除链表的倒数第 N 个结点
  • 探索设计模式的魅力:掌握命令模式-解锁软件设计的‘遥控器’
  • LNMP搭建discuz论坛
  • 257.【华为OD机试真题】幼儿园篮球游戏(贪心算法-JavaPythonC++JS实现)
  • [计算机网络]深度学习传输层TCP协议
  • 动态头部:统一目标检测头部与注意力
  • 【状态估计】深度传感器与深度估计算法(1/3)
  • ClickHouse从入门到精通(高级)
  • 什么是Docker的容器编排工具,它们之间有何不同?
  • qml之Control类型布局讲解,padding属性和Inset属性细讲
  • 【Jvm】性能调优(拓展)Jprofiler如何监控和解决死锁、内存泄露问题
  • 运行错误(竞赛遇到的问题)
  • nodename nor servname provided, or not known
  • 前端vue金额用逗号分隔
  • vulvhub-----Hacker-KID靶机