gpt4 book ai didi

html - 如何避免文本在 td 中重叠?

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

enter image description here

我使用 pd4ml jar 从 html 生成了一个 pdf。显示的图像是生成的 pdf,其中文本在 td 中相互重叠。代码如下


<table>
<tr>
<td class="reportHeading" align="middle"><b>$title</b></td>
<td class="reportLogo"><img height="${logoHeight}" src='$logo'></img></td>
</tr>
</table>

CSS 是

    .reportHeading {
font-size: 15pt;
text-align:left;
height:auto;
vertical-align: middle;
}
.reportLogo {
text-align:right;
padding-right:2px;
padding-left:2px;
padding-top:2px;
padding-bottom:2px;
}


我不想添加 overflow:hidden 因为它会隐藏文本。我想连同 Logo 一起完整显示文本。

最佳答案

让它甜美而简单。只需在 CSS 下方添加。谢谢

.reportHeading b {
line-height: 15px;
}

关于html - 如何避免文本在 td 中重叠?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59207407/

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