<msub>
MathML <msub>
元素用来为表达式加下标,语法如下:<msub> base subscript </msub>
。
属性
- class, id, style
-
供样式表使用。
- href
-
用来设置标签点击后跳转的链接。
- mathbackground
-
用来设置标签的背景色,可以使用
#rgb
、#rrggbb
或者HTML 颜色名。 - mathcolor
-
用来设置标签文字的颜色,同样可以使用
#rgb
、#rrggbb
或者HTML 颜色名。 - subscriptshift
-
用来设置下标相对于表达式的基线的最小距离,它是一个长度值 (en-US)。
例子
下述代码表示:
您的浏览器的渲染结果:
<math>
<msub>
<mi>X</mi>
<mn>1</mn>
</msub>
</math>
规范
Specification |
---|
MathML Core # subscripts-and-superscripts-msub-msup-msubsup |
浏览器兼容性
BCD tables only load in the browser
关于 Gecko 的特殊说明
- 从 Gecko 26.0 开始,不允许使用<none />作为子元素。The rendering has been made more consistent with equivalent configurations of
<msup>
and<mmultiscripts> (en-US)
and a bug with an incorrect application of thesuperscriptshift
attribute has been fixed (see bug 827713 for details).
相关链接
<msup>
(Superscript)<msubsup>
(Subscript-superscript pair)<mmultiscripts> (en-US)
(Prescripts and tensor indices)