CSS中可以使用此菜单菜单步进器吗?

时间:2019-04-28 11:07:25

标签: html css

设计师建议使用此菜单项:

但是我真的很难找到能够做到这一点的东西。 我发现最困难的是模拟三个大圆圈之间的“可折叠”垂直白线。

我知道单击V向下箭头时可以使用如下所示的手风琴来隐藏和显示内容  https://codepen.io/oguzA/pen/vjNQEz

但这是我无法实现的“弹性”白色竖向物体。

对于垂直线,我使用了一种类似于的方法,但都是固定的东西: https://codepen.io/azkai/pen/qRNGBO

/* Delete these base styles before copying and pasting into your CSS */
body { font-size: 21px; font-family: Roboto; margin: 30px 30px; } *, *:before, *:after { box-sizing: border-box; }
/* End of delete base styles */

/* -------------------------------------------------------------------------
  VERTICAL STEPPERS
-------------------------------------------------------------------------- */

/* Steps */
.step {
  position: relative;
  min-height: 1em;
  color: gray;
}
.step + .step {
  margin-top: 1.5em
}
.step > div:first-child {
  position: static;
  height: 0;
}
.step > div:not(:first-child) {
  margin-left: 1.5em;
  padding-left: 1em;
}
.step.step-active {
  color: #4285f4
}
.step.step-active .circle {
  background-color: #4285f4;
}

/* Circle */
.circle {
  background: gray;
  position: relative;
  width: 1.5em;
  height: 1.5em;
  line-height: 1.5em;
  border-radius: 100%;
  color: #fff;
  text-align: center;
  box-shadow: 0 0 0 3px #fff;
}

/* Vertical Line */
.circle:after {
  content: ' ';
  position: absolute;
  display: block;
  top: 1px;
  right: 50%;
  bottom: 1px;
  left: 50%;
  height: 100%;
  width: 1px;
  transform: scale(1, 2);
  transform-origin: 50% -100%;
  background-color: rgba(0, 0, 0, 0.25);
  z-index: -1;
}
.step:last-child .circle:after {
  display: none
}

/* Stepper Titles */
.title {
  line-height: 1.5em;
  font-weight: bold;
}
.caption {
  font-size: 0.8em;
}

/* Delete these base styles before copying and pasting into your CSS */ body { font-size: 21px; font-family: Roboto; margin: 30px 30px; } *, *:before, *:after { box-sizing: border-box; } /* End of delete base styles */ /* ------------------------------------------------------------------------- VERTICAL STEPPERS -------------------------------------------------------------------------- */ /* Steps */ .step { position: relative; min-height: 1em; color: gray; } .step + .step { margin-top: 1.5em } .step > div:first-child { position: static; height: 0; } .step > div:not(:first-child) { margin-left: 1.5em; padding-left: 1em; } .step.step-active { color: #4285f4 } .step.step-active .circle { background-color: #4285f4; } /* Circle */ .circle { background: gray; position: relative; width: 1.5em; height: 1.5em; line-height: 1.5em; border-radius: 100%; color: #fff; text-align: center; box-shadow: 0 0 0 3px #fff; } /* Vertical Line */ .circle:after { content: ' '; position: absolute; display: block; top: 1px; right: 50%; bottom: 1px; left: 50%; height: 100%; width: 1px; transform: scale(1, 2); transform-origin: 50% -100%; background-color: rgba(0, 0, 0, 0.25); z-index: -1; } .step:last-child .circle:after { display: none } /* Stepper Titles */ .title { line-height: 1.5em; font-weight: bold; } .caption { font-size: 0.8em; }

我应该在哪里找到这样的组件?

0 个答案:

没有答案