浏览器使用哪种等宽字体? [英] Which monospace font does a browser use?
问题描述
使用CSS,如果您指定 font-family:monospace;
,我的理解是浏览器选择其默认/首选等宽字体。
如果正确,如何确定浏览器使用的是等宽字体?
有有5个通用的族可以使用: serif, sans-serif,草书,幻想和 monospace。当浏览器看到其中一种字体时,会向操作系统询问该系列中的默认字体。
因此,Web浏览器使用的字体取决于操作系统。 / p>
请参见 Mozilla的文档在 font-family
上查看。
With CSS, if you specify font-family: monospace;
, my understanding is that the browser chooses its default/preferred monospaced font.
If that's correct, how can you determine which monospaced font your browser is using?
There are 5 generic families that can be used: "serif", "sans-serif", "cursive", "fantasy", and "monospace". When a browser sees one of those, it asks the operating system for the default font in that family.
Thus, which font a web browser uses is OS-dependent.
See Mozilla's documentation on font-family
for details.
这篇关于浏览器使用哪种等宽字体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!