这次给大家带来文字超过规定行数时自动生成省略号,文字超过规定行数时自动生成省略号的注意事项有哪些,下面就是实战案例,一起来看一下。
www.jb51.net jQuery自动添加省略号
You probably can't do it (currently?) without a fixed-width font like Courier. With a fixed-width font every letter occupies the same horizontal space, so you could probably count the letters and multiply the result with the current font size in ems or exs. Then you would just have to test how many letters fit on one line, and then break it up.
运行效果:

相信看了本文案例你已经掌握了方法,更多精彩请关注php中文网其它相关文章!
推荐阅读:
采用.NET CLR2.0、VS2005及SQL2000,前台页面使用用DIV+CSS开发;可以使用动态化运行,也可以采用全部静态化动作,甚至自己定义模板;后台信息编辑器采用最新版FCKeditor;产品信息可导出为EXCEL、WORD、PDF等格式存储;产品信息可以通过EXCEL模板批量导入;产品分类采用无限级分类;产品图片上传支持图片水印和文字水印,同时支持自动生成缩略图功能;电子邮件发送支持









