--- title: slug: Web/MathML/Element/msubsup tags: - MathML - MathML 参考 translation_of: Web/MathML/Element/msubsup ---
{{MathMLRef}}

MathML <msubsup> 元素用于为表达式同时附加上角标和下角标。

它的语法如下:<msubsup> base subscript superscript </msubsup>.

属性

classidstyle
样式使用。
href
Used to set a hyperlink to a specified URI.
mathbackground
背景颜色。支持 #rgb#rrggbbHTML 颜色名称
mathcolor
文本颜色。支持 #rgb#rrggbbHTML 颜色名称
subscriptshift {{deprecated_inline}}
The minimum space by which to shift the subscript below the baseline of the expression, as a length value.
This attribute is deprecated and will be removed in the future.
superscriptshift {{deprecated_inline}}
The minimum space by which to shift the superscript above the baseline of the expression, as a length value.
This attribute is deprecated and will be removed in the future.

示例

示例渲染结果:x1

当前浏览器中的渲染结果: 0 1

<math displaystyle="true">

  <msubsup>
    <mo> &#x222B;<!-- 积分符号 --> </mo>
    <mn> 0 </mn>
    <mn> 1 </mn>
  </msubsup>

</math>

规范

规范 状态 备注
{{ SpecName('MathML3', 'chapter3.html#presm.msubsup', 'msubsup') }} {{ Spec2('MathML3') }} Current specification
{{ SpecName('MathML2', 'chapter3.html#presm.msubsup', 'msubsup') }} {{ Spec2('MathML2') }} Initial specification

浏览器兼容性

{{Compat("mathml.elements.msubsup")}}

参见