html - 如何增加箭头进度条 CSS 的高度
问题描述
我正在尝试实现带箭头的进度条,但遇到了 CSS 错误。当我增加内容的高度时,附加箭头的高度不会增加。尝试运行代码 spinnet,您将了解我面临的错误。错误基于 CSS 和三角形/箭头进度条内容高度
ol.steps {
list-style: none;
margin: 0;
padding: 0;
overflow: hidden;
font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', 'DejaVu Sans', 'Bitstream Vera Sans', 'Liberation Sans', Verdana, 'Verdana Ref', sans-serif;
font-size: 13px;
line-height: 20px;
font-weight: bold;
counter-reset: li;
}
ol.steps li {
list-style-image: none;
list-style-type: none;
margin-left: 0;
text-align: center;
color: #3a3a3a;
background: #dae4eb;
position: relative;
margin-left: 43px;
}
ol.steps li:after {
position: absolute;
top: 30%;
left: 100%;
content: " ";
height: 0;
width: 0;
pointer-events: none;
border: solid transparent;
border-left-color: #dae4eb;
border-width: 19px;
margin-top: -19px;
}
ol.steps li:first-child {
margin-left: 0;
}
ol.steps li:first-child span {
padding: 9px;
}
ol.steps li:first-child span:after {
border: none;
}
ol.steps li:last-child:after {
border-width: 0;
}
ol.steps li span {
display: block;
padding: 9px 28px 9px 9px;
}
ol.steps li span:after {
position: absolute;
top: 50%;
right: 100%;
content: " ";
height: 0;
width: 0;
pointer-events: none;
border: solid #dae4eb;
border-left-color: transparent;
border-width: 19px;
margin-top: -19px;
}
ol.steps li span:before {
content: counter(li) " ";
counter-increment: li;
}
ol.steps>li {
float: left;
}
ol.steps li.current {
height: 60px;
color: #fff;
background: #0078b4;
}
ol.steps li.current:after {
border-left-color: #0078b4;
}
ol.steps li.current span:after {
border-color: #7b7b7b;
border-left-color: transparent;
}
ol.steps li.step1 {
z-index: 9;
}
ol.steps li.step2 {
z-index: 8;
}
ol.steps li.step3 {
z-index: 7;
}
ol.steps li.step4 {
z-index: 6;
}
ol.steps li.step5 {
z-index: 5;
}
ol.steps li.step6 {
z-index: 4;
}
ol.steps li.step7 {
z-index: 3;
}
ol.steps li.step8 {
z-index: 2;
}
ol.steps li.step9 {
z-index: 1;
}
ol.steps li.step10 {
z-index: 0;
}
<ol class="steps">
<li class="step1 current"><span><br>Submitted</span></li>
<li class="step2"><span><br>.</span></li>
<li class="step3"><span><br>.</span></li>
<li class="step4"><span><br>.</span></li>
<li class="step5"><span><br>.</span></li>
</ol>
错误图像:在此处输入图像描述
我尝试了许多 CSS 调整,但成功匹配了高度
解决方案
推荐阅读
- java - Spring中的ImportSelector和ImportBeanDefinitionRegistar有什么区别?
- java - 获取有效 HTTP 字符的正则表达式
- python - 控制ROUNDED_RECTANGLE的圆角,python + pptx
- ios - 优化在 Ray Wenderlich 上发现的 2d 瓦片碰撞(objective-c)
- java - 如何知道 Netty ByteBuf 中是否没有数据可读取?
- r - 如何在 sas 中实现 r 中的子集?
- gradle - 如何从 processResources Gradle 任务中排除多个文件
- java - doc文件需要在文件名附近显示doc徽标,例如whatsapp
- python - 匹配 Pandas 数据框中的一对多列
- angular - 如何订阅rxjs中另一个对象中引用的对象的属性更改