css中a標簽內容超出最大字數隱藏處理
問題:a標簽內容超出最大字數顯示問題
1.超出是最后顯示為“...”
2.鼠標放在上面顯示完整內容
3.點擊新窗口打開鏈接內容
解決方法:
css部分:
.list{font:Georgia, "Times New Roman", Times, serif;font-size:14px;width: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>