gpt4 book ai didi

html - 如何仅使用 css 在具有 anchor 的表格内显示带椭圆的文本

转载 作者:行者123 更新时间:2023-11-28 11:12:42 25 4
gpt4 key购买 nike

如何在不使用表格布局的情况下仅使用 css 在具有 anchor 标记的表格内显示带省略号的文本:已修复;

<table>
<tr>
<td>
<a href="">
very lengthy text
</a>
</td>
</tr>

最佳答案

像这样使用 css 类 -->

.truncate {
width: 250px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

关于html - 如何仅使用 css 在具有 anchor 的表格内显示带椭圆的文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21900512/

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