【发布时间】:2015-10-20 15:51:47
【问题描述】:
我有一个表格,其中一些单元格中有链接。这些链接中的文本可能很长。表格单元格的溢出被隐藏,因此所有单元格的宽度相同。当我在标签上放置引导工具提示时,这会导致问题,因为工具提示向右移动以居中链接文本的隐藏宽度。
这是一个演示我的问题的小提琴:http://jsfiddle.net/zjy1t9s7/
<table class="table table-condensed table-hover">
<tbody>
<tr>
<td >
<a data-original-title="666" data-toggle="tooltip" data-placement="bottom" title="">
This link has an incredibly long text which shifts the entire tooltip outside of the table cell, I personally think this looks like shit and want to fix it. Let's see if I can reproduce it here.
</a>
</td>
<td >
<a data-original-title="555" data-toggle="tooltip" data-placement="bottom" title="">
These are not as big
</a>
</td>
<td >
<a data-original-title="555" data-toggle="tooltip" data-placement="bottom" title="">
These are not as big
</a>
</td>
<td >
<a data-original-title="555" data-toggle="tooltip" data-placement="bottom" title="">
These are not as big
</a>
</td>
</tr>
</tbody>
</table>
td {
border:1px solid #333;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 75px;
}
将鼠标悬停在第一个表格单元格上,看看我的意思。
这可以修复吗?
【问题讨论】:
标签: javascript html css twitter-bootstrap