css中a标签内容超出最大字数隐藏处理

css中a标签内容超出最大字数隐藏处理

问题:a标签内容超出最大字数显示问题

1.超出是最后显示为“...”

2.鼠标放在上面显示完整内容

3.点击新窗口打开链接内容

解决方法:

css部分:

.list{font:Georgia, "Times New Roman", Times, serif;font-size:14px;200px;display:block;overflow:hidden;word-break:keep-all;white-space:nowrap;text-overflow:ellipsis;}

html部分:

<a class="list" title="我是1111111111111111111111111111111111111111111111111111" href="http://localhost" target="_blank">我是1111111111111111111111111111111111111111111111111111</a>

  

  

原文地址:https://www.cnblogs.com/harry335/p/5210540.html