aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/javascript/reference/global_objects/string/small
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/ja/web/javascript/reference/global_objects/string/small
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/ja/web/javascript/reference/global_objects/string/small')
-rw-r--r--files/ja/web/javascript/reference/global_objects/string/small/index.html74
1 files changed, 74 insertions, 0 deletions
diff --git a/files/ja/web/javascript/reference/global_objects/string/small/index.html b/files/ja/web/javascript/reference/global_objects/string/small/index.html
new file mode 100644
index 0000000000..a826ac6df3
--- /dev/null
+++ b/files/ja/web/javascript/reference/global_objects/string/small/index.html
@@ -0,0 +1,74 @@
+---
+title: String.prototype.small()
+slug: Web/JavaScript/Reference/Global_Objects/String/small
+tags:
+ - Deprecated
+ - HTML wrapper methods
+ - JavaScript
+ - Method
+ - Prototype
+ - Reference
+ - String
+translation_of: Web/JavaScript/Reference/Global_Objects/String/small
+---
+<div>{{JSRef}} {{deprecated_header}}</div>
+
+<p><strong><code>small()</code></strong> メソッドは、文字列が小さなフォントで表示されるように HTML の {{HTMLElement("small")}} 要素を生成します。</p>
+
+<h2 id="Syntax" name="Syntax">構文</h2>
+
+<pre class="syntaxbox notranslate"><var>str</var>.small()</pre>
+
+<h3 id="Return_value" name="Return_value">返値</h3>
+
+<p>HTML の {{HTMLElement("small")}} 要素を含む文字列です。</p>
+
+<h2 id="Description" name="Description">解説</h2>
+
+<p><code>small()</code> メソッドは、文字列を <code>&lt;small&gt;</code> 要素の中に、 "<code>&lt;small&gt;str&lt;/small&gt;</code>" のように埋め込みます。</p>
+
+<h2 id="Examples" name="Examples">例</h2>
+
+<h3 id="small_の使用">small() の使用</h3>
+
+<p>以下の例では文字列のメソッドを使用して、文字列の大きさを変更しています。</p>
+
+<pre class="brush: js notranslate">var worldString = 'Hello, world';
+
+console.log(worldString.small()); // &lt;small&gt;Hello, world&lt;/small&gt;
+console.log(worldString.big()); // &lt;big&gt;Hello, world&lt;/big&gt;
+console.log(worldString.fontsize(7)); // &lt;font size="7"&gt;Hello, world&lt;/fontsize&gt;
+</pre>
+
+<p>{{domxref("ElementCSSInlineStyle/style", "element.style")}} オブジェクトを使用すると、要素の <code>style</code> 属性を使用して、次のようにもっと汎用的に操作することができます。</p>
+
+<pre class="brush: js notranslate">document.getElementById('yourElemId').style.fontSize = '0.7em';
+</pre>
+
+<h2 id="Specifications" name="Specifications">仕様書</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">仕様書</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-string.prototype.small', 'String.prototype.small')}}</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの互換性</h2>
+
+<div class="hidden">このページの互換性一覧表は構造化データから生成されています。データに協力していただけるのであれば、 <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> をチェックアウトしてプルリクエストを送信してください。</div>
+
+<p>{{Compat("javascript.builtins.String.small")}}</p>
+
+<h2 id="See_also" name="See_also">関連情報</h2>
+
+<ul>
+ <li>{{jsxref("String.prototype.fontsize()")}}</li>
+ <li>{{jsxref("String.prototype.big()")}}</li>
+</ul>