我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

php中的文本长度

I have a text and I want to cut this in the end of the line, I don't want a page break, with Arial it's easy to do because all font size is the same, but I'm using a font type where the fonts size is very different, for example i and w. So it's hard to determine the size of the text in the screen,

What is the easiest way to do this, on the server side (php, imagettfbbox) or on the client side (javascript, jQuery)?

CSS.

white-space:nowrap;
overflow-x:hidden;
width:100px;

近期文章

  • android studio
  • 判定一个栈ST(最多元素为m0)为空的条件是
  • 怎么把每三个月分为一组啊,代码怎么写呢
  • Hbuilderx右下角红叉叉报错怎么解决?
  • visual studio2022 unicode编码问题
  • Matlab读取文件夹下所有文件名,并实现合并
  • I2C调试时SCL波形异常
  • jupyter notebook问题
  • 如何从while循环中的最后一个echo中删除逗号?
  • 省级数字经济发展报告
  • spring启动 ERROR org.springframework.boot.SpringApplication - Application run failed 报错
  • 泛型各种数据在方法里运算,怎么转变运算?
  • Python蛮力法归治法减治法
  • 关于nvm的使用,出现了下面的错误
  • Python 列转行失败
  • 字典的典型应用:二级(多级)菜单
  • 如何从字符串中用大写字母查找(和替换)单词?
  • asp.net查询电话号码时报错,转换varchar值''溢出
  • 生态系统服务价值评估中敏感性分析
  • 节末尾的注释有两页在wps中显示在同一节,而在word中却在不同节

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华