我需要在文本前后显示带点和文本的文本,如下面的屏幕截图所示。要在一行中显示的文本
文本应显示在一行。这是我试过的代码:
.before-text:before {
content: "•";
}
.before-text:after {
content: "";
border-bottom: 1px solid black;
width: 200px;
position: absolute;
margin-top: 7px;
}
.after-text:before {
content: "";
border-bottom: 1px solid black;
width: 200px;
position: absolute;
margin-top: 7px;
}
.after-text:after {
content: "•";
}
<span class="before-text"></span>
<div>Long long long text</div>
<span class="after-text"></span>
该生产线是重叠的点。 – athi
点将通过线只有你可以左右调整到-1或-2px ..这不会有任何问题..这种解决方案是灵活的,可以在任何设备上工作。 –
是否可以用flex做到这一点? – athi