<msup>

MathML <msup> 元素用于为表达式附加上标。

使用语法如下:<msup> base superscript </msup>

属性

该元素的属性包括全局 MathML 属性 (en-US)和以下已弃用的属性:

superscriptshift 已弃用 非标准

<length-percentage> 值,表示上标基线向上移动的最小距离。

备注: 对于 superscriptshift 属性,一些浏览器可能也会接受旧版 MathML 长度 (en-US)

示例

html
<math display="block">
  <msup>
    <mi>X</mi>
    <mn>2</mn>
  </msup>
</math>

规范

Specification
MathML Core
# subscripts-and-superscripts-msub-msup-msubsup

浏览器兼容性

BCD tables only load in the browser

参见