会员
周边
新闻
博问
AI培训
云市场
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
浮生若夢♬為歡幾何
Always put yourself in the other's shoes.If you feel that it hurts you,it probably hurts others,too.
博客园
首页
新随笔
联系
订阅
管理
2019年4月23日
[JavaScript] 根据指定宽度截取字符串
摘要: /** * 根据指定宽度截取字符串 * @param desc 原始字符串 * @param width 该显示的宽度 * @param fontsize 字体大小 12px * @returns {string} 截取后的字符串 */ export function getStrByWith (desc, width, fontsize) { var span = docum...
阅读全文
posted @ 2019-04-23 14:39 晏过留痕
阅读(1055)
评论(1)
推荐(2)
编辑