From 1386fed7d38652d5848d315927e7e23a66cffd13 Mon Sep 17 00:00:00 2001 From: Alexey Pyltsyn Date: Wed, 20 Oct 2021 13:28:52 +0300 Subject: [RU] Remove `name` attribute from headings (#2788) --- files/ru/web/css/font-size/index.html | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'files/ru/web/css/font-size/index.html') diff --git a/files/ru/web/css/font-size/index.html b/files/ru/web/css/font-size/index.html index 9bb80b7a76..41d48d0706 100644 --- a/files/ru/web/css/font-size/index.html +++ b/files/ru/web/css/font-size/index.html @@ -15,7 +15,7 @@ translation_of: Web/CSS/font-size

{{EmbedInteractiveExample("pages/css/font-size.html")}}

-

Синтаксис

+

Синтаксис

/* значения в <абсолютных размерах> */
 font-size: xx-small;
@@ -50,7 +50,7 @@ font-size: unset;
  
  • Как <значение длины> или <процентное значение>, по отношению к размеру родительского элемента.
  • -

    Значения

    +

    Значения

    xx-small, x-small, small, medium, large, x-large, xx-large
    @@ -75,15 +75,15 @@ font-size: unset; {{csssyntax}} -

    Возможные подходы

    +

    Возможные подходы

    Существуют разные способы задания размера шрифта. С помощью ключевых слов или с помощью числовых значений для размера пикселей или размера ems.  Выберите подходящий метод в зависимости от потребностей конкретной веб-страницы.

    -

    Ключевые слова

    +

    Ключевые слова

    Keywords are a good way to set the size of fonts on the web. By setting a keyword font size on the body element, you can set relative font-sizing everywhere else on the page, giving you the ability to easily scale the font up or down on the entire page accordingly.

    -

    Pixels

    +

    Pixels

    Setting the font size in pixel values (px) is a good choice when you need pixel accuracy. A px value is static. This is an OS-independent and cross-browser way of literally telling the browsers to render the letters at exactly the number of pixels in height that you specified. The results may vary slightly across browsers, as they may use different algorithms to achieve a similar effect.

    @@ -91,7 +91,7 @@ font-size: unset;
    Note: Defining font sizes in pixel is not accessible, because the user cannot change the font size from the browser. (For example, users with limited vision may wish to set the font size much larger than the size chosen by a web designer.) Therefore, avoid using pixels for font sizes if you wish to create an inclusive design.
    -

    Ems

    +

    Ems

    Another way of setting the font size is with em values. The size of an em value is dynamic. When defining the font-size property, an em is equal to the size of the font that applies to the parent of the element in question. If you haven't set the font size anywhere on the page, then it is the browser default, which is probably 16px. So, by default 1em = 16px, and 2em = 32px. If you set a font-size of 20px on the body element, then 1em = 20px and 2em = 40px. Note that the value 2 is essentially a multiplier of the current em size.

    @@ -125,7 +125,7 @@ span {

    Assuming that the browser's default font-size is 16px, the words "outer" would be rendered at 16px, but the word "inner" would be rendered at 25.6px. This is because the inner span's font-size is 1.6 em which is relative to its parent's font-size, which is in turn relative to its parent's font-size. This is often called compounding.

    -

    Rems

    +

    Rems

    rem values were invented in order to sidestep the compounding problem. rem values are relative to the root html element, not the parent element. In other words, it lets you specify a font size in a relative fashion without being affected by the size of the parent, thereby eliminating compounding.

    @@ -147,9 +147,9 @@ span {

    In this example, the words "outer inner outer" are all displayed at 16px (assuming that the browser's font-size has been left at the default value of 16px).

    -

    Примеры

    +

    Примеры

    -

    Пример 1

    +

    Пример 1

    /* Set paragraph text to be very large. */
     p { font-size: xx-large }
    @@ -187,11 +187,11 @@ span { font-size: 16px; }
     
     

    {{EmbedLiveSample('Пример_2','600','200')}}

    -

    Примечание

    +

    Примечание

    em and ex units on the {{Cssxref("font-size")}} property are relative to the parent element's font size (unlike all other properties, where they're relative to the font size on the element). This means em units and percentages do the same thing for {{Cssxref("font-size")}}.

    -

    Спецификации

    +

    Спецификации

    @@ -225,6 +225,6 @@ span { font-size: 16px; }
    -

    Совместимость браузеров

    +

    Совместимость браузеров

    {{Compat("css.properties.font-size")}}

    -- cgit v1.2.3-54-g00ecf