Что такое «em», если размер шрифта документа указан в ems?

В CSSem является относительной единицей, основанной на размере шрифта документа. Итак, что именноem тогда, если размер шрифта документаitself измеряется в ems? Предположим, мы говорим:

<code><style type = "text/css">
body
{
    font-size: 1em;
}
</style>
</code>

Итак,em теперь рекурсивно определяется. Так как же это обрабатывается браузером?

W3C документы сказать:

The 'em' unit is equal to the computed value of the 'font-size' property of the element on which it is used. The exception is when 'em' occurs in the value of the 'font-size' property itself, in which case it refers to the font size of the parent element. It may be used for vertical or horizontal measurement. (This unit is also sometimes called the quad-width in typographic texts.)

Но что, если элементdocument.bodyтак нет родительского элемента?

Ответы на вопрос(3)

Ваш ответ на вопрос