How to determine the length (in pixels) of a string being rendered on a web page?

前端 未结 5 641
盖世英雄少女心
盖世英雄少女心 2020-12-14 17:19

If I know the font size (12) and the font family (calibri), is there a way to determine the length (in pixels) a given string will take after it will be rendered? I am absol

5条回答
提交回复
热议问题