aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/mathml/element/msup
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/web/mathml/element/msup')
-rw-r--r--files/zh-cn/web/mathml/element/msup/index.html90
1 files changed, 90 insertions, 0 deletions
diff --git a/files/zh-cn/web/mathml/element/msup/index.html b/files/zh-cn/web/mathml/element/msup/index.html
new file mode 100644
index 0000000000..36513dd6f7
--- /dev/null
+++ b/files/zh-cn/web/mathml/element/msup/index.html
@@ -0,0 +1,90 @@
+---
+title: <msup>
+slug: Web/MathML/Element/msup
+tags:
+ - MathML
+ - MathML 元素
+ - MathML 参考
+translation_of: Web/MathML/Element/msup
+---
+<div>{{MathMLRef}}</div>
+
+<p><span class="seoSummary">MathML <code><strong>&lt;msup&gt;</strong></code> 元素用于为表达式加上标。</span></p>
+
+<p>语法如下:<code>&lt;msup&gt; <em>base superscript</em> &lt;/msup&gt;</code>。</p>
+
+<h2 id="属性">属性</h2>
+
+<dl>
+ <dt id="attr-class-id-style"><code>class</code>, <code>id</code>, <code>style</code></dt>
+ <dd>用来供<a href="/zh-CN/docs/Web/CSS">样式表</a>使用。</dd>
+ <dt id="attr-href"><code>href</code></dt>
+ <dd>用来设置标签点击后跳转的链接。</dd>
+ <dt id="attr-mathbackground"><code>mathbackground</code></dt>
+ <dd>用来设置背景色,可以使用 <code>#rgb</code>、<code>#rrggbb</code> 或者 <a href="/zh-CN/docs/Web/CSS/color_value">HTML 颜色名</a>。</dd>
+ <dt id="attr-mathcolor"><code>mathcolor</code></dt>
+ <dd>用来设置文字颜色,同样可以使用 <code>#rgb</code>、<code>#rrggbb</code> 或者 <a href="/zh-CN/docs/Web/CSS/color_value">HTML 颜色名</a>。</dd>
+ <dt id="attr-superscriptshift"><code>superscriptshift</code> {{deprecated_inline}}</dt>
+ <dd>用来设置上标相对于表达式的基线的最小距离,它是一个<a href="/en-US/docs/MathML/Attributes/Values#Lengths">长度值</a>。<br>
+ 此属性已被弃用,且将在未来被删除。</dd>
+</dl>
+
+<h2 id="例子">例子</h2>
+
+<p>下述代码表示:<img alt="x1" src="/files/3203/msup.png" style="margin-left: 10px; vertical-align: middle;"></p>
+
+<p>您的浏览器的渲染结果:<math> <msup> <mi>X</mi> <mn>2</mn> </msup> </math></p>
+
+<pre class="brush: html">&lt;math&gt;
+
+  &lt;msup&gt;
+    &lt;mi&gt;X&lt;/mi&gt;
+    &lt;mn&gt;2&lt;/mn&gt;
+  &lt;/msup&gt;
+
+&lt;/math&gt;
+</pre>
+
+<h2 id="规范">规范</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">规范</th>
+ <th scope="col">状态</th>
+ <th scope="col">备注</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{ SpecName('MathML3', 'chapter3.html#presm.msup', 'msup') }}</td>
+ <td>{{ Spec2('MathML3') }}</td>
+ <td>Current specification</td>
+ </tr>
+ <tr>
+ <td>{{ SpecName('MathML2', 'chapter3.html#presm.msup', 'msup') }}</td>
+ <td>{{ Spec2('MathML2') }}</td>
+ <td>Initial specification</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+
+
+<p>{{Compat("mathml.elements.msup")}}</p>
+
+<h3 id="Gecko说明">Gecko说明</h3>
+
+<ul>
+ <li>从 Gecko 26.0 {{geckoRelease("26")}} 开始,不再支持使用 &lt;none /&gt; 作为子元素。并且渲染结果和 {{MathMLElement("msub")}} 和 {{MathMLElement("mmultiscripts")}} 这些等价配置更加接近,同时修复了一个关于 superscriptshift 属性错误使用的问题(参阅 {{bug("827713")}}).</li>
+</ul>
+
+<h2 id="参见">参见</h2>
+
+<ul>
+ <li>{{ MathMLElement("msub") }}(下标)</li>
+ <li>{{ MathMLElement("msubsup") }}(上下标)</li>
+ <li>{{ MathMLElement("mmultiscripts") }}(四角标,张量式标记)</li>
+</ul>