diff options
| author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:42:52 -0500 |
|---|---|---|
| committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:42:52 -0500 |
| commit | 074785cea106179cb3305637055ab0a009ca74f2 (patch) | |
| tree | e6ae371cccd642aa2b67f39752a2cdf1fd4eb040 /files/ru/web/javascript/reference/global_objects/string/small | |
| parent | da78a9e329e272dedb2400b79a3bdeebff387d47 (diff) | |
| download | translated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.gz translated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.bz2 translated-content-074785cea106179cb3305637055ab0a009ca74f2.zip | |
initial commit
Diffstat (limited to 'files/ru/web/javascript/reference/global_objects/string/small')
| -rw-r--r-- | files/ru/web/javascript/reference/global_objects/string/small/index.html | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/files/ru/web/javascript/reference/global_objects/string/small/index.html b/files/ru/web/javascript/reference/global_objects/string/small/index.html new file mode 100644 index 0000000000..00fd79119f --- /dev/null +++ b/files/ru/web/javascript/reference/global_objects/string/small/index.html @@ -0,0 +1,109 @@ +--- +title: String.prototype.small() +slug: Web/JavaScript/Reference/Global_Objects/String/small +tags: + - Deprecated + - JavaScript + - Method + - Prototype + - Reference + - String + - Методы оборачивания в HTML +translation_of: Web/JavaScript/Reference/Global_Objects/String/small +--- +<div>{{JSRef("Global_Objects", "String")}} {{deprecated_header}}</div> + +<h2 id="Summary" name="Summary">Сводка</h2> +<p>Метод <strong><code>small()</code></strong> создаёт HTML-элемент {{HTMLElement("small")}}, заставляющий строку отображаться маленьким шрифтом.</p> + +<h2 id="Syntax" name="Syntax">Синтаксис</h2> +<pre class="syntaxbox"><code><var>str</var>.small()</code></pre> + +<h2 id="Description" name="Description">Описание</h2> +<p>Метод <code>small()</code> заключает строку в тег <code><small></code>: <code>"<small>str</small>"</code>.</p> + +<h2 id="Examples" name="Examples">Примеры</h2> + +<h3 id="Example:_Using_small" name="Example:_Using_small">Пример: использование метода <code>small()</code></h3> +<p>В следующем примере демонстрируется использование нескольких строковых методов для изменения размера строки:</p> +<pre class="brush: js">var worldString = 'Привет, мир'; + +console.log(worldString.small()); // <small>Привет, мир</small> +console.log(worldString.big()); // <big>Привет, мир</big> +console.log(worldString.fontsize(7)); // <fontsize=7>Привет, мир</fontsize> +</pre> +<p>При помощи объекта {{domxref("HTMLElement.style", "element.style")}} вы можете получить значение атрибута <code>style</code> элемента и управлять им более обобщённым способом, например:</p> +<pre class="brush: js">document.getElementById('yourElemId').style.fontSize = '0.7em'; +</pre> + +<h2 id="Specifications" name="Specifications">Спецификации</h2> +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">Спецификация</th> + <th scope="col">Статус</th> + <th scope="col">Комментарии</th> + </tr> + <tr> + <td>{{SpecName('ES6', '#sec-string.prototype.small', 'String.prototype.small')}}</td> + <td>{{Spec2('ES6')}}</td> + <td>Изначальное определение. Реализована в JavaScript 1.0.<br> + Определена в (нормативном) Приложении B по Дополнительным возможностям ECMAScript для веб-браузеров.</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">Совместимость с браузерами</h2> +<div>{{CompatibilityTable}}</div> +<div id="compat-desktop"> + <table class="compat-table"> + <tbody> + <tr> + <th>Возможность</th> + <th>Chrome</th> + <th>Firefox (Gecko)</th> + <th>Internet Explorer</th> + <th>Opera</th> + <th>Safari</th> + </tr> + <tr> + <td>Базовая поддержка</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatGeckoDesktop("1.0")}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + </tr> + </tbody> + </table> +</div> +<div id="compat-mobile"> + <table class="compat-table"> + <tbody> + <tr> + <th>Возможность</th> + <th>Android</th> + <th>Chrome для Android</th> + <th>Firefox Mobile (Gecko)</th> + <th>IE Mobile</th> + <th>Opera Mobile</th> + <th>Safari Mobile</th> + </tr> + <tr> + <td>Базовая поддержка</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatGeckoMobile("1.0")}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + </tr> + </tbody> + </table> +</div> + +<h2 id="See_also" name="See_also">Смотрите также</h2> +<ul> + <li>{{jsxref("String.prototype.fontsize()")}}</li> + <li>{{jsxref("String.prototype.big()")}}</li> +</ul> |
