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.
有一个字符串,比如$x = "Poste : "; How to get $x's pixel length ?那就是 $x 占用了多少像素?
$x = "Poste : ";
它不存在。事实上,每个字符的宽度取决于字体、字体大小、样式(粗体、斜体、正常等)。
游行就是使用像Courier这样的等宽字体的新样式,比如每个字符要等宽;)