我该如何携带li:在div“ progressbar”下方之后,它似乎刚好在身体上方

时间:2018-06-27 09:04:12

标签: html css html5 position z-index

在这里,我尝试使用html和css制作多步骤表单。 li:after是水平线,而li:before是进度条的圆形部分。将card的background属性设置为白色或某种纯色会隐藏li:after。

.card {
    background: transparent;    /*white */
    height: auto;
    z-index: 1;
}
#msform {
    background: transparent;    /* white */
}
ul, li{
    margin-top: 15px;
    list-style-type: none !important;
    margin: 0px;
    padding: 0px;
}
li {
    margin-top: 15px;
    text-align: center;
}
#progressbar {
    margin-bottom: 30px;
    overflow: hidden;
    counter-reset: step;
    background: transparent;
}
#progressbar li {
    list-style-type: none;
    color: lightgrey;
    text-transform: capitalize;
    font-size: 9px;
    letter-spacing: 0.25px;
    width: 25%;
    float: left;
    position: relative;
    background: transparent;   /* white */
}
#progressbar li:before {
    content: counter(step);
    counter-increment: step;
    width: 15px;
    line-height: 15px;
    display: block;
    font-size: 10px;
    color: lightgrey;
    background: lightgrey;
    border-radius: 50%;
    margin: 0 auto 5px auto;
}
#progressbar li:after {
    content: '';
    width: 100%;
    height: 2px;
    background: lightgrey;
    position: absolute;
    left: -50%;
    top: 7px;
    z-index: -1;
}

请给我一些建议。 这是提供的github: https://github.com/KumarShubham001/Test_UI

0 个答案:

没有答案