我有一个列表,它为缩进留下了一些空间,同时也提供了虚线的底层。但是,用于此列表的display属性不匹配,当找到空格时,将导致文本更改行。这是一个小提琴。
CSS:
.dashed {
display: block;
width: 100%;
height: 90%;
border-bottom: dashed 2px #54687a;
}
li {
display: table-row;
}
li span {
display: table-cell;
padding-right: 1em;
}我试图只保留一个display属性,但失败了。有人能解决这个问题吗?
让我们用图像说话!
现在发生了什么-这是问题所在:

预期结果:

发布于 2015-11-11 03:21:34
更新-最终的css应该是
ul li span {
background: url("../img/arrow.png") 0 50% no-repeat;
background: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/29841/arrow.svg") 0 50% no-repeat;
list-style-type: none;
padding-left: 12px;
}
.dashed {
border-bottom: 2px dashed #54687a;
display: block;
width: 58%;
margin-bottom:10px;
}
li {
display: table-row;
padding-bottom:5px;
}
li span {
display: inline-block;
padding-right: 1em;
width:23%;
}检查更新的演示- http://jsfiddle.net/cmfL2643/21/
https://stackoverflow.com/questions/33643639
复制相似问题