作者热门文章
- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我正在尝试使用点引导符创建一个响应式分类键,我已经非常完美了,除了在调整浏览器大小时,引导符右侧的一些文本比剩余空间大,所以它跳到下一行在之前的位置留下一个空白区域。我想要扩展点来填充这个空白区域。
例如'spines' 和 'Scomberomorus' 之间的点见:
这是我的:
这就是我想要的:
对于我是初学者的错误表示歉意。
.ol {
list-style-position: outside;
}
.list li {
position: relative;
overflow: hidden;
list-style-position: inside;
list-style-type: lower-alpha;
padding-left: 15px;
text-indent: -15px;
}
.list li:after {
content: "..........................................................................";
text-indent: 20px;
display: inline-block;
letter-spacing: 6px;
position: absolute;
left: 0px;
bottom: 0px;
z-index: -10;
}
.list li span {
display: inline;
background-color: #fff;
padding-right: 1px;
}
.list li .number {
float: right;
font-weight: bold;
color: #198e9d;
background-color: #fff;
padding-left: 17px;
}
<div>
<ol>
<li>
<ol class="list">
<li style="margin-bottom: 1em; margin-top: -1em;"><span style="padding-left: em;">Snout as long as rest of head (Fig 6a); gill rakers absent; first dorsal fin with 13 – 27 spines</span> <span class="number"><em>Acanthocybium solandri</em> (wahoo)</span></li>
<li class="list;" style="margin-bottom: 2em;"><span style="padding-left: .1em;">Snout much shorter than rest of head (Fig. 6b); at least 3 gill rakers present; first dorsal fin with 8 – 22 spines</span> <span class="number"><em>Scomberomorus</em> (Spanish mackerel)</span></li>
</ol>
</li>
<li>
<ol class="list">
<li style="margin-bottom: 1em; margin-top: -1em;"><span style="padding-left: .1em;">2 lateral lines (Fig. 4)</span> <span class="number"><em>Grammatorcynus bilineatus</em> (doublelined mackerel)</span></li>
<li style="margin-bottom: 2em;"><span style="padding-left: .1em;">A single (upper) lateral line</span> <span class="number">3</span></li>
</ol>
</li>
</ol>
</div>
最佳答案
这行得通。我还清理了您的 HTML/CSS,希望您不要介意。
div {
overflow: hidden;
}
ol {
list-style-position: outside;
}
.list li {
position: relative;
list-style-position: outside;
list-style-type: lower-alpha;
}
.list .list-item {
margin: 1em 0;
}
.list .list-item:last-child {
margin: 0 0 2em;
}
.list .list-item::before {
content: "..........................................................................";
text-indent: 5px;
letter-spacing: 6px;
position: absolute;
left: 0px;
bottom: 0px;
z-index: -10;
}
.list .list-item .text::after {
content: "..........................................................................";
text-indent: 5px;
letter-spacing: 6px;
position: absolute;
left: 0px;
z-index: -10;
}
.list .list-item span {
display: inline;
background-color: #fff;
padding-right: 1px;
}
.list .list-item .number {
float: right;
font-weight: bold;
color: #198e9d;
background-color: #fff;
padding-left: 17px;
}
/* Clearfix */
.list .list-item::after {
content: "";
display: block;
clear: both;
}
<div>
<ol>
<li>
<ol class="list">
<li class="list-item"><span class="text">Snout as long as rest of head (Fig 6a); gill rakers absent; first dorsal fin with 13 – 27 spines</span> <span class="number"><em>Acanthocybium solandri</em> (wahoo)</span></li>
<li class="list-item"><span class="text">Snout much shorter than rest of head (Fig. 6b); at least 3 gill rakers present; first dorsal fin with 8 – 22 spines</span> <span class="number"><em>Scomberomorus</em> (Spanish mackerel)</span></li>
</ol>
</li>
<li>
<ol class="list">
<li class="list-item"><span class="text">2 lateral lines (Fig. 4)</span> <span class="number"><em>Grammatorcynus bilineatus</em> (doublelined mackerel)</span></li>
<li class="list-item"><span class="text">A single (upper) lateral line</span> <span class="number">3</span></li>
</ol>
</li>
</ol>
</div>
关于html - 点领导跨越两条线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48438892/
来源:www.cnblogs.com/Finley/p/16395466.html 前言 在电商、支付等领域,往往会有这样的场景,用户下单后放弃支付了,那这笔订单会在指定的时间段后进行关闭操作,细心的
来源:www.cnblogs.com/Finley/p/16395466.html 前言 在电商、支付等领域,往往会有这样的场景,用户下单后放弃支付了,那这笔订单会在指定的时间段后进行关闭操作,细心的
我是一名优秀的程序员,十分优秀!