aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/mathml/element/msub/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/web/mathml/element/msub/index.html')
-rw-r--r--files/zh-cn/web/mathml/element/msub/index.html197
1 files changed, 197 insertions, 0 deletions
diff --git a/files/zh-cn/web/mathml/element/msub/index.html b/files/zh-cn/web/mathml/element/msub/index.html
new file mode 100644
index 0000000000..8acea4f5bb
--- /dev/null
+++ b/files/zh-cn/web/mathml/element/msub/index.html
@@ -0,0 +1,197 @@
+---
+title: <msub>
+slug: Web/MathML/Element/msub
+translation_of: Web/MathML/Element/msub
+---
+<div>{{MathMLRef}}</div>
+
+<p class="summary">MathML<code><strong>&lt;msub&gt;</strong></code>元素用来为表达式加下标,语法如下:<code><strong>&lt;msub&gt; base subscript &lt;/msub&gt;</strong></code>。</p>
+
+<h2 id="属性">属性</h2>
+
+<dl>
+ <dt id="attr-class-id-style">class, id, style</dt>
+ <dd>供<a href="/en-US/docs/CSS">样式表</a>使用。</dd>
+ <dt id="attr-href">href</dt>
+ <dd>用来设置标签点击后跳转的链接。</dd>
+ <dt id="attr-mathbackground">mathbackground</dt>
+ <dd>用来设置标签的背景色,可以使用<code><strong>#rgb</strong></code>、<strong><code>#rrggbb</code></strong>或者<a href="/zh-CN/docs/Web/CSS/color_value">HTML颜色名</a>。</dd>
+ <dt id="attr-mathcolor">mathcolor</dt>
+ <dd>用来设置标签文字的颜色,同样可以使用<code><strong>#rgb</strong></code>、<strong><code>#rrggbb</code></strong>或者<a href="/zh-CN/docs/Web/CSS/color_value">HTML颜色名</a>。</dd>
+ <dt id="attr-subscriptshift">subscriptshift</dt>
+ <dd>用来设置下标相对于表达式的基线的最小距离,它是一个<a href="/en-US/docs/MathML/Attributes/Values#Lengths">长度值</a>。</dd>
+</dl>
+
+<h2 id="例子">例子</h2>
+
+<p>下述代码表示:<img alt="x1" src="/files/3202/msub.png" style="margin-left: 10px; vertical-align: middle;"></p>
+
+<p>您的浏览器的渲染结果: <math> <msub> <mi>X</mi> <mn>1</mn> </msub> </math></p>
+
+<pre class="brush: html">&lt;math&gt;
+
+  &lt;msub&gt;
+    &lt;mi&gt;X&lt;/mi&gt;
+    &lt;mn&gt;1&lt;/mn&gt;
+  &lt;/msub&gt;
+
+&lt;/math&gt;
+</pre>
+
+<h2 id="规范">规范</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{ SpecName('MathML3', 'chapter3.html#presm.msub', 'msub') }}</td>
+ <td>{{ Spec2('MathML3') }}</td>
+ <td>Current specification</td>
+ </tr>
+ <tr>
+ <td>{{ SpecName('MathML2', 'chapter3.html#presm.msub', 'msub') }}</td>
+ <td>{{ Spec2('MathML2') }}</td>
+ <td>Initial specification</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+<p>{{CompatibilityTable}}</p>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatNo}}</td>
+ <td>{{ CompatGeckoDesktop("1.0") }}</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{CompatNo}}</td>
+ <td>5.1</td>
+ </tr>
+ <tr>
+ <td><code>href</code></td>
+ <td>{{CompatNo}}</td>
+ <td>{{ CompatGeckoDesktop("7.0") }}</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ </tr>
+ <tr>
+ <td><code>mathbackground</code></td>
+ <td>{{CompatNo}}</td>
+ <td>{{ CompatGeckoDesktop("2.0") }}</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{CompatNo}}</td>
+ <td>5.1</td>
+ </tr>
+ <tr>
+ <td><code>mathcolor</code></td>
+ <td>{{CompatNo}}</td>
+ <td>{{ CompatGeckoDesktop("2.0") }}</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{CompatNo}}</td>
+ <td>5.1</td>
+ </tr>
+ <tr>
+ <td><code>subscriptshift</code></td>
+ <td>{{CompatNo}}</td>
+ <td>{{ CompatGeckoDesktop("1.0") }}</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Android</th>
+ <th>Chrome for Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{ CompatGeckoMobile("1.0") }}</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{ CompatNo() }}</td>
+ </tr>
+ <tr>
+ <td><code>href</code></td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{ CompatGeckoMobile("7.0") }}</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{ CompatNo() }}</td>
+ </tr>
+ <tr>
+ <td><code>mathbackground</code></td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{ CompatGeckoMobile("2.0") }}</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{ CompatNo() }}</td>
+ </tr>
+ <tr>
+ <td><code>mathcolor</code></td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{ CompatGeckoMobile("2.0") }}</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{ CompatNo() }}</td>
+ </tr>
+ <tr>
+ <td><code>subscriptshift</code></td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{ CompatGeckoMobile("1.0") }}</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{ CompatNo() }}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="关于Gecko的特殊说明">关于Gecko的特殊说明</h2>
+
+<ul>
+ <li>从Gecko 26.0 {{geckoRelease("26")}}开始,不允许使用&lt;none /&gt;作为子元素。The rendering has been made more consistent with equivalent configurations of {{MathMLElement("msup")}} and {{MathMLElement("mmultiscripts")}} and a bug with an incorrect application <code>of the </code><code>superscriptshift</code> attribute has been fixed (see {{bug("827713")}} for details).</li>
+</ul>
+
+<h2 id="相关链接">相关链接</h2>
+
+<ul>
+ <li>{{ MathMLElement("msup") }} (Superscript)</li>
+ <li>{{ MathMLElement("msubsup") }} (Subscript-superscript pair)</li>
+ <li>{{ MathMLElement("mmultiscripts") }} (Prescripts and tensor indices)</li>
+</ul>