div文字溢出自动加省略号
1、纯CSS方法。(推荐)
.text_overflow{width:27em; white-space:nowrap; text-overflow:ellipsis; -o-text-overflow:ellipsis; overflow:hidden;}
优点:兼容各大主流浏览器。被省略的文字在源代码里仍然保留,利于SEO。
2、jQuery 函数:ellipsis();
调用方法:
1.$(document).ready(function() {
2. $('.ellipsis').ellipsis();
3.}