.hide {
cursor: pointer;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
只需要设置一个css样式,然后在标签上设置属性title = "内容" 即可。
例如 表格标签
<tr>
<td class="hide" title="要显示的内容">要显示的内容</td>
</tr>
.hide {
cursor: pointer;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
只需要设置一个css样式,然后在标签上设置属性title = "内容" 即可。
例如 表格标签
<tr>
<td class="hide" title="要显示的内容">要显示的内容</td>
</tr>