gpt4 book ai didi

html - 试图在html中的一行内显示两行

转载 作者:搜寻专家 更新时间:2023-10-31 22:54:20 26 4
gpt4 key购买 nike

我正在使用 ASP MVC 和 Bootstrap 中的元素工作,我需要显示变压器的调节,这通过以下方式表示:

enter image description here

我试图通过以下方式来做,但我没有达到我想要的结果:

<table>
<tr>
<td rowspan="2">132 &#177;</td>
<td>12x1,5 %</td>
</tr>
<tr style="margin-top: 0px;">
<td>8x1.5%</td>
</tr>
</table>

最佳答案

您在将 rowspan 与表格一起使用方面走在了正确的轨道上。我用下面的例子完成了它,最好使用monospace字体。

table {
font-family: monospace;
}

td[rowspan] {
font-size: 1.5em;
}
<table>
<tr>
<td rowspan="2">(132</td>
<td>+ 12x1,5 %</td>
<td rowspan="2">)/13,86kV</td>
</tr>
<tr>
<td>- 8x1.5 %</td>
</tr>
</table>

关于html - 试图在html中的一行内显示两行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49388010/

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