html - 如何应用文本溢出:省略号和溢出:未设置在一起
问题描述
如何处理我需要设置的 css,overflow: unset
让我在悬停时显示弹出提示,并ellipsis
在单元格中的数据过大时显示?我的桌子下有以下 HTML。为了确保元素在悬停在元素上时div
弹出不被元素覆盖的警告消息。我必须设置水平。设置好之后好像不行了?建议?我检查了一些帖子,都提到了,
所以我想知道是否有适合我的解决方案?
应用“文本溢出:省略号;” 到内部 div
和
列表溢出;做文本溢出:省略号;td
span
overflow: unset
td
text-overflow
overflow: hidden
我的代码:
.tr .td {
position: sticky
overflow: unset;
z-index: 2;
white-space: nowrap;
text-overflow: ellipsis;
}
<tr>
<td class="td" role="cell" style="position: sticky; left: 46px;">
<span class="data" aria-expanded="false">
cell data
<div class="poptip" role="tooltip" aria-hidden="true"></div>
</span>
</td>
</tr>