目录生成点线,长度自动添加
javascript
<div style=" display: flex; position: relative; overflow: hidden;">
<div style="flex: 1;position: relative;">
<a
style=" position: relative;
display: inline; line-height: 1.5; z-index: 2;">
css样式实现目录功能实现自动填充满容器剩余空间,并始终追随在文字后方
<!-- 填充.....的容器 -->
<span style="position: absolute;
left: 100%;
bottom: 0.35em;
width: 100vw;
background-image: radial-gradient(circle, #7f8c8d 1px, transparent 1.5px);
background-size: 6px 1.5px;
background-repeat: repeat-x;
height: 1.5px;
z-index: 1;"></span>
</a>
</div>
</div>
效果如下
