代码之家  ›  专栏  ›  技术社区  ›  arunmmanoharan

用CSS跳过步进连接线

  •  1
  • arunmmanoharan  · 技术社区  · 5 年前

    我有一个步进组件与反应建立。该组件接受一个步骤数组,并接受一个已禁用步骤的索引数组来跳过这些步骤。我想有跳跃虚线的方式如下所示使用CSS。

    enter image description here

    我造的步进器:

    enter image description here

    应使用CSS:

    enter image description here

    密码在这里 Stackblitz

    请导航到 步骤.jsx 对于款式。

    请指教。

    1 回复  |  直到 5 年前
        1
  •  2
  •   Par Tha    5 年前

    尝试为特定的li元素添加.skip类,并在css下面添加

    CSS

    .skip:before{
        content: "";
        width: 100%;
        height: 50px;
        position: absolute;
        bottom: -10px;
        border: 1px dashed;
        border-top: 0;
        border-radius: 0 0 100% 100%;
    }
    

    输出

    enter image description here