这次给大家带来jQuery优化文字超过规定字数用户体验,jQuery优化文字超过规定字数用户体验的注意事项有哪些,下面就是实战案例,一起来看一下。
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中文网其它相关文章!
推荐阅读:
위 내용은 jQuery优化文字超过规定字数用户体验의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!