CSS测量单位实际上代表什么? [英] What does CSS measurement unit 'em' actually stand for?

查看:89
本文介绍了CSS测量单位实际上代表什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如标题所说,我想知道CSS单元em是什么意思。

像'cm'代表 c enti m

As the title says, I want to know what exactly the CSS unit 'em' stands for.
As in 'cm' stands for centimeter.

我不是在问什么是'em'是什么或如何使用!

I am not asking what 'em' is or how it is used!

我在 W3C 上找不到答案。

Wikipedia 文章已在说某事:

I couldn't find an answer on W3C.
The Wikipedia article was already saying "something":


的em与M相关。原始单位是从给定字体中的大写M的宽度派生的。

The name of em is related to M. Originally the unit was derived from the width of the capital "M" in the given typeface.

第一句的解释是em是字母M的发音/语音。

但是阅读第二句话,看起来em中的e关于字母M的宽度。

所以我还是迷路了,真正代表什么!

My interpretation of the first sentence would be that 'em' is the pronunciation/phonetic for the letter 'M'.
But reading the second sentence, it seems that the 'e' in 'em' stands for something regarding the width of the letter 'M'.
So I'm still lost, what 'em' really stands for!

推荐答案

这是一个历史定义;在现代使用中它仅仅指字体的大小,其中词em本身不再具有任何实际或相关的含义。事实上,同一篇维基百科文章详细介绍了其在以后的部分中的使用和含义的演变。 / a>:

That is a historical definition; in modern usage it simply refers to the size of the font, with the word "em" itself no longer having any practical or relevant meaning. As a matter of fact, the same Wikipedia article expands on this evolution in its usage and meaning in a later section:


一个em传统上定义为当前字体和点大小中大写字母M的宽度, M通常投射在印刷机中使用的正方形块或em-quad(也称为羊肉四边形)的全宽。然而,在现代字体中,字符M通常略小于一英寸宽。此外,随着该术语已经扩展到包括更多种语言和字符集,其含义已经演变;这允许它包括不包括大写字母M的那些字体,字体和字符集,例如中文和阿拉伯字母。因此,em通常意味着所讨论的字体的点大小,这与字体所投射的金属体的高度相同。

One em was traditionally defined as the width of the capital "M" in the current typeface and point size, as the "M" was commonly cast the full-width of the square "blocks", or "em-quads" (also "mutton-quads"), which are used in printing presses. However, in modern typefaces, the character M is usually somewhat less than one em wide. Moreover, as the term has expanded to include a wider variety of languages and character sets, its meaning has evolved; this has allowed it to include those fonts, typefaces, and character sets which do not include a capital "M", such as Chinese and the Arabic alphabet. Thus, em generally means the point size of the font in question, which is the same as the height of the metal body a font was cast on.

特别是在CSS方面,em不一定指的是特定字体的大写字母M的宽度;

Particularly in terms of CSS, an "em" doesn't necessarily refer to the width of the capital M for a particular font; it's just a relative quantity.

如果你问的是em这个词的词源,维基百科本身只包含一个引用 Adob​​e词汇表,其中没有更多说明:

If you're asking about the etymology of the word "em", Wikipedia itself only contains a reference to the Adobe Glossary, which has little more to say about it:


排版中的常用测量单位。 Em通常被定义为当前面中的大写字母M的宽度和点大小。它更恰当地定义为简单的当前点大小。例如,在12点类型中,em是12点的距离。

A common unit of measurement in typography. Em is traditionally defined as the width of the uppercase M in the current face and point size. It is more properly defined as simply the current point size. For example, in 12-point type, em is a distance of 12 points.

没有明确提及任何权威性,表示资本M,但考虑其名称定义,我不排除这种可能性。

It's not explicitly mentioned anywhere authoritative that it's a phonetic representation of the capital M, but considering its namesake definition I wouldn't rule out such a possibility.

这篇关于CSS测量单位实际上代表什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆