gpt4 book ai didi

html - tds 中圆圈之间的车道

转载 作者:太空宇宙 更新时间:2023-11-04 00:37:01 26 4
gpt4 key购买 nike

我如何在这些圆圈之间放置车道,我一直在谷歌搜索,但我没有看到最简单的方法,

.table_1 {
tr {
color: #000000;
font-size: 20px;
letter-spacing: 0.4px;
line-height: 30px;
td:nth-child(2) {
vertical-align: baseline;
}
td:nth-child(1) {
display: flex;
justify-content: center;
margin-right: 28px;
width: 42px;
height: 42px;
display: block;
border: 1px solid #999999;
border-radius: 100%;
text-align: center;
margin-bottom: 31%;
span {
vertical-align: middle;
color: #999999;
font-size: 24px;
line-height: 32px;
text-align: center;
}
}
}
}

编辑...我想用类似的线连接所有的圈子

    1
|
2
|
3

等等

https://jsfiddle.net/cfmorales/hutpvac5/1/

最佳答案

是这样的吗? css有注释

tr {
color: #000000;
font-size: 20px;
letter-spacing: 0.4px;
line-height: 30px;
}

td {
display: flex;
justify-content: center;
margin-right: 28px;
width: 42px;
height: 42px;
display: block;
border: 1px solid #999999;
border-radius: 100%;
text-align: center;
margin-bottom: 31%;

/* making the element relative to position the lane relative to it */
position: relative;
}


/* Selecting all td except the last one and using pseudo-class :after to shape the lane */

tr:not(:last-child)>td:before {
content: '';
position: absolute;
background: red;
height: 20px;
width: 4px;
top: 110%;
left: 50%;
transform: translateX(-50%)
}

span {
vertical-align: middle;
color: #999999;
font-size: 24px;
line-height: 32px;
text-align: center;
}
<table class="table_1">
<tbody>
<tr>
<td><span>1</span></td>
</tr>
<tr>
<td><span>2</span></td>
</tr>
<tr>
<td><span>3</span></td>
</tr>
<tr>
<td><span>4</span></td>
</tr>
<tr>
<td><span>5</span></td>
</tr>
</tbody>
</table>
<p></p>

关于html - tds 中圆圈之间的车道,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59177758/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com