Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试图弄清楚给定一些 html(仅包含 span、break 和 paragragh 标签和文本,没有图像、表格等)和客户端宽度会出现多少行。我还需要知道每行包含的文本。这可能吗?
如何获取渲染内容的客户端高度(以像素为单位),然后将其除以所用字体的高度(以像素为单位)。显然,这仅限于使用单一字体并知道该字体的高度。