Element UI 的 el-steps 实现竖直方向的步骤条设置成虚线,并显示出最后一步的连接线

.el-steps--vertical .el-step:last-child:before {   // 最后一步加实线
  content: "";
  position: absolute;
  top: -4px; /* 调整连接线位置 */
  left: 1.1%; /* 垂直方向的偏移值调整 */
  width: 1px;
  height: calc(100% + 8px);
  border-left: 3px solid #ccc; /* 将虚线改为实线 */
}


虚线代码
::v-deep .el-step.is-vertical  .el-step__line{
    border: 2px dashed #CCD1DE;
    top: 0;
    bottom: 0;
    left: 11px;
    background-color: transparent;
}

猜你喜欢

转载自blog.csdn.net/qq_44716001/article/details/131478257